>>>>> On Wed, 05 Feb 2003 09:12:08 -0500
>>>>> "DE" == Dan Espen <[EMAIL PROTECTED]> wrote:
DE> 
DE> Hi,
DE> I'm not subscribed, cc fvwm-workers if you have questions.
DE> 
DE> We recently changed fvwm so that when it launches a process,
DE> it first closes STDIN.  We did this for gmplayer as discussed
DE> in this thread:
DE> 
DE> http://www.hpc.uh.edu/fvwm/archive/0301/msg00305.html
DE> 

I believe that the solution I have proposed about a year ago, and
which I apply to my debian package is more obvious and correct:

--- fvwm/builtins.c.orig        Sun Jan 13 02:04:00 2002
+++ fvwm/builtins.c     Sun Jan 13 04:00:43 2002
@@ -782,6 +782,11 @@
   /* Not everyone has vfork! */
   if (!(fork())) /* child process */
   {
+    if ( setpgrp() == -1 )
+    {
+      fvwm_msg(ERR,"exec_function","setpgrp failed (%s)",strerror(errno));
+      exit(100);
+    }
     if (execl(exec_shell_name, exec_shell_name, "-c", cmd, NULL)==-1)
     {
       fvwm_msg(ERR,"exec_function","execl failed (%s)",strerror(errno));

The patch does not apply to the current fvwm, since close(0) appeared
(which should definetly replaced with close(STDIN_FILENO))

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia
--
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]

Reply via email to