On Mon, Jan 28, 2002 at 07:46:46PM -0500, Dan Espen wrote: > Dominik Vogt <[EMAIL PROTECTED]> writes: > > On Mon, Jan 28, 2002 at 07:29:19PM +0300, Alexander Kotelnikov wrote: > > > > > Content-Description: patch to make fvwm survive with SIGTTIN > > > (and actually other signals from exec'ed programs) > > > > Wasn't there a portability issue with setpgrp? I'm willing to > > commit a patch if it's clear that it compiles on any platform. > > I think there is. > There are autoconf macros for setpgrp but I really don't understand > how to use them.
Well, the info page on autoconf says: - Macro: AC_FUNC_SETPGRP If `setpgrp' takes no argument (the POSIX.1 version), define `SETPGRP_VOID'. Otherwise, it is the BSD version, which takes two process ID as arguments. This macro does not check whether `setpgrp' exists at all; if you need to work in that situation, first call `AC_CHECK_FUNC' for `setpgrp'. And the setpgrp man page: int setpgrp(void); ... In the Linux DLL 4.4.1 library, setpgrp simply calls setpgid(0,0). So it seems clear to me what to do: If setpgid is present, use setpgid(0, 0); If setpgrp is present and has no parameters use setpgrp(); If setpgrp is present and has two parameters, use setpgrp(0, 0); Actually, I'm guessing that setpgrp with 2 parameters takes the same arguments as setpgid. I don't have any documentation about that version. Can anybody help me out here? I've written the necessary configure.in stuff and a replacement fvwm_setpgrp in libs/setpgrp.[ch]. I'll apply the patch using that new function. Bye Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]