bugratpoison - Bugs: bug #16226, infinite waitpid() loop on tmpwm...


bug #16226: infinite waitpid() loop on tmpwm exit

Submitted by:  None
Submitted on:  Thu 30 Mar 2006 09:55:28 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 08 Feb 2013 09:35:31 PM UTC, comment #1:

I believe this should be fixed for 1.4.6 (s/SIG_IGN/SIG_DFL/).

Jérémie Courrèges-Anglas <jca>
Project Administrator
Thu 30 Mar 2006 09:55:28 AM UTC, original submission:

ratpoison 1.4.0-beta4 never regains control after starting a tmpwm and exiting the temp window manager. It seems that b/c we are setting SIGCHLD to IGN, there are no child processes to wait on. By commenting out the set_sig_handler() calls, I get normal behaviour. Otherwise, waitpid() just repeatedly returns -1 and the loop goes on infinitely. I've seen this on both Linux and Solaris. See code below.

/* Disable our SIGCHLD handler */
/* set_sig_handler (SIGCHLD, SIG_IGN); */
/* Launch the new WM and wait for it to terminate. */
pid = spawn (ARG_STRING(0));
PRINT_DEBUG (("spawn pid: %d\n", pid));
child = waitpid (pid, &status, 0);
PRINT_DEBUG (("waitpid: %d, %d, %d [%s]\n", child, status, errno, strerror(errno)));
} while (child != pid);
/* Enable our SIGCHLD handler */
/* set_sig_handler (SIGCHLD, chld_handler); */



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jca (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-14 jca Open/ClosedOpen => Closed
    2013-02-08 jca StatusNone => Fixed
    2006-03-30 zzap Carbon-Copy- => Added zzap

    Back to the top

    Powered by Savane 3.3