/[baselayout]/trunk/src/librc.c
Gentoo

Diff of /trunk/src/librc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3000 Revision 3001
601 fprintf (stderr, "vfork: %s\n", strerror (errno)); 601 fprintf (stderr, "vfork: %s\n", strerror (errno));
602 602
603 return (pid); 603 return (pid);
604} 604}
605 605
606int rc_waitpid (pid_t pid)
607{
608 int status = 0;
609 pid_t savedpid = pid;
610 int retval = -1;
611
612 errno = 0;
613 while ((pid = waitpid (savedpid, &status, 0)) > 0) {
614 if (pid == savedpid)
615 retval = WIFEXITED (status) ? WEXITSTATUS (status) : EXIT_FAILURE;
616 }
617
618 return (retval);
619}
620librc_hidden_def(rc_waitpid)
621
622pid_t rc_service_stop (const char *service) 606pid_t rc_service_stop (const char *service)
623{ 607{
624 if (rc_service_state (service) & RC_SERVICE_STOPPED) 608 if (rc_service_state (service) & RC_SERVICE_STOPPED)
625 return (0); 609 return (0);
626 610

Legend:
Removed from v.3000  
changed lines
  Added in v.3001

  ViewVC Help
Powered by ViewVC 1.1.20