[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setpgrp on msdos and w32
From: |
Eli Zaretskii |
Subject: |
Re: setpgrp on msdos and w32 |
Date: |
Mon, 15 Nov 2010 18:13:22 +0200 |
> From: Dan Nicolaescu <address@hidden>
> Date: Mon, 15 Nov 2010 01:50:58 -0500
>
> Does setpgrp do anything in our msdos and w32 ports?
No. You will see a no-op emulation of setpgrp in w32.c (for w32); the
C library used to build the MSDOS port does not even have an emulation.
> The #else branch of this code from callproc.c:child_setup
>
> #if defined(USG)
> #ifndef SETPGRP_RELEASES_CTTY
> setpgrp (); /* No arguments but equivalent in this case */
> #endif
> #else
> setpgrp (pid, pid);
> #endif /* USG */
>
> might be executed on msdos and w32.
It isn't, because neither of these 2 builds defines USG.
> If setpgrp does not do anything, this code can be moved inside the not
> WINDOWSNT and not MSDOS
> #ifdefs, and that would allow all the code from that point to the end of the
> function to move
> up, removing one set of #ifdefs.
Yes, feel free to do that. Thanks.