~ubuntu-branches/ubuntu/breezy/nbd/breezy-security

« back to all changes in this revision

Viewing changes to nbd-server.c

  • Committer: Bazaar Package Importer
  • Author(s): Wouter Verhelst
  • Date: 2005-05-07 11:37:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050507113720-1fjynvdkq7va9nj9
Tags: 1:2.7.4-1
New upstream release. Contains patches from Roy Keene to make it all work
a tad bit more reliable (thanks, Roy!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
 **/
357
357
void sigchld_handler(int s)
358
358
{
359
 
        int* status=NULL;
 
359
        int status;
360
360
        int i;
361
361
        char buf[80];
362
362
        pid_t pid;
363
363
 
364
 
        while((pid=wait(status)) > 0) {
 
364
        while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
365
365
                if(WIFEXITED(status)) {
366
366
                        memset(buf,'\0', 80);
367
367
                        snprintf(buf, 79, "%d", WEXITSTATUS(status));