root/kernel/exit.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. generate
  2. send_sig
  3. notify_parent
  4. release
  5. bad_task_ptr
  6. audit_ptree
  7. session_of_pgrp
  8. kill_pg
  9. kill_sl
  10. kill_proc
  11. sys_kill
  12. is_orphaned_pgrp
  13. has_stopped_jobs
  14. forget_original_parent
  15. exit_files
  16. exit_fs
  17. exit_sighand
  18. exit_mm
  19. exit_notify
  20. do_exit
  21. sys_exit
  22. sys_wait4
  23. sys_waitpid

   1 /*
   2  *  linux/kernel/exit.c
   3  *
   4  *  Copyright (C) 1991, 1992  Linus Torvalds
   5  */
   6 
   7 #undef DEBUG_PROC_TREE
   8 
   9 #include <linux/wait.h>
  10 #include <linux/errno.h>
  11 #include <linux/signal.h>
  12 #include <linux/sched.h>
  13 #include <linux/kernel.h>
  14 #include <linux/resource.h>
  15 #include <linux/mm.h>
  16 #include <linux/tty.h>
  17 #include <linux/malloc.h>
  18 
  19 #include <asm/segment.h>
  20 extern void sem_exit (void);
  21 
  22 int getrusage(struct task_struct *, int, struct rusage *);
  23 
  24 static int generate(unsigned long sig, struct task_struct * p)
     /* [previous][next][first][last][top][bottom][index][help] */
  25 {
  26         unsigned long mask = 1 << (sig-1);
  27         struct sigaction * sa = sig + p->sig->action - 1;
  28 
  29         /* always generate signals for traced processes ??? */
  30         if (!(p->flags & PF_PTRACED)) {
  31                 /* don't bother with ignored signals (but SIGCHLD is special) */
  32                 if (sa->sa_handler == SIG_IGN && sig != SIGCHLD)
  33                         return 0;
  34                 /* some signals are ignored by default.. (but SIGCONT already did its deed) */
  35                 if ((sa->sa_handler == SIG_DFL) &&
  36                     (sig == SIGCONT || sig == SIGCHLD || sig == SIGWINCH))
  37                         return 0;
  38         }
  39         p->signal |= mask;
  40         if (p->state == TASK_INTERRUPTIBLE && (p->signal & ~p->blocked))
  41                 wake_up_process(p);
  42         return 1;
  43 }
  44 
  45 int send_sig(unsigned long sig,struct task_struct * p,int priv)
     /* [previous][next][first][last][top][bottom][index][help] */
  46 {
  47         if (!p || sig > 32)
  48                 return -EINVAL;
  49         if (!priv && ((sig != SIGCONT) || (current->session != p->session)) &&
  50             (current->euid != p->euid) && (current->euid != p->uid) && !suser())
  51                 return -EPERM;
  52         if (!sig)
  53                 return 0;
  54         /*
  55          * Forget it if the process is already zombie'd.
  56          */
  57         if (!p->sig)
  58                 return 0;
  59         if ((sig == SIGKILL) || (sig == SIGCONT)) {
  60                 if (p->state == TASK_STOPPED)
  61                         wake_up_process(p);
  62                 p->exit_code = 0;
  63                 p->signal &= ~( (1<<(SIGSTOP-1)) | (1<<(SIGTSTP-1)) |
  64                                 (1<<(SIGTTIN-1)) | (1<<(SIGTTOU-1)) );
  65         }
  66         if (sig == SIGSTOP || sig == SIGTSTP || sig == SIGTTIN || sig == SIGTTOU)
  67                 p->signal &= ~(1<<(SIGCONT-1));
  68         /* Actually generate the signal */
  69         generate(sig,p);
  70         return 0;
  71 }
  72 
  73 void notify_parent(struct task_struct * tsk)
     /* [previous][next][first][last][top][bottom][index][help] */
  74 {
  75         if (tsk->p_pptr == task[smp_num_cpus])          /* Init */
  76                 tsk->exit_signal = SIGCHLD;
  77         send_sig(tsk->exit_signal, tsk->p_pptr, 1);
  78         wake_up_interruptible(&tsk->p_pptr->wait_chldexit);
  79 }
  80 
  81 void release(struct task_struct * p)
     /* [previous][next][first][last][top][bottom][index][help] */
  82 {
  83         int i;
  84 
  85         if (!p)
  86                 return;
  87         if (p == current) {
  88                 printk("task releasing itself\n");
  89                 return;
  90         }
  91         for (i=1 ; i<NR_TASKS ; i++)
  92                 if (task[i] == p) {
  93                         nr_tasks--;
  94                         task[i] = NULL;
  95                         REMOVE_LINKS(p);
  96                         release_thread(p);
  97                         if (STACK_MAGIC != *(unsigned long *)p->kernel_stack_page)
  98                                 printk(KERN_ALERT "release: %s kernel stack corruption. Aiee\n", p->comm);
  99                         free_page(p->kernel_stack_page);
 100                         current->cmin_flt += p->min_flt + p->cmin_flt;
 101                         current->cmaj_flt += p->maj_flt + p->cmaj_flt;
 102                         current->cnswap += p->nswap + p->cnswap;
 103                         kfree(p);
 104                         return;
 105                 }
 106         panic("trying to release non-existent task");
 107 }
 108 
 109 #ifdef DEBUG_PROC_TREE
 110 /*
 111  * Check to see if a task_struct pointer is present in the task[] array
 112  * Return 0 if found, and 1 if not found.
 113  */
 114 int bad_task_ptr(struct task_struct *p)
     /* [previous][next][first][last][top][bottom][index][help] */
 115 {
 116         int     i;
 117 
 118         if (!p)
 119                 return 0;
 120         for (i=0 ; i<NR_TASKS ; i++)
 121                 if (task[i] == p)
 122                         return 0;
 123         return 1;
 124 }
 125         
 126 /*
 127  * This routine scans the pid tree and makes sure the rep invariant still
 128  * holds.  Used for debugging only, since it's very slow....
 129  *
 130  * It looks a lot scarier than it really is.... we're doing nothing more
 131  * than verifying the doubly-linked list found in p_ysptr and p_osptr, 
 132  * and checking it corresponds with the process tree defined by p_cptr and 
 133  * p_pptr;
 134  */
 135 void audit_ptree(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 136 {
 137         int     i;
 138 
 139         for (i=1 ; i<NR_TASKS ; i++) {
 140                 if (!task[i])
 141                         continue;
 142                 if (bad_task_ptr(task[i]->p_pptr))
 143                         printk("Warning, pid %d's parent link is bad\n",
 144                                 task[i]->pid);
 145                 if (bad_task_ptr(task[i]->p_cptr))
 146                         printk("Warning, pid %d's child link is bad\n",
 147                                 task[i]->pid);
 148                 if (bad_task_ptr(task[i]->p_ysptr))
 149                         printk("Warning, pid %d's ys link is bad\n",
 150                                 task[i]->pid);
 151                 if (bad_task_ptr(task[i]->p_osptr))
 152                         printk("Warning, pid %d's os link is bad\n",
 153                                 task[i]->pid);
 154                 if (task[i]->p_pptr == task[i])
 155                         printk("Warning, pid %d parent link points to self\n",
 156                                 task[i]->pid);
 157                 if (task[i]->p_cptr == task[i])
 158                         printk("Warning, pid %d child link points to self\n",
 159                                 task[i]->pid);
 160                 if (task[i]->p_ysptr == task[i])
 161                         printk("Warning, pid %d ys link points to self\n",
 162                                 task[i]->pid);
 163                 if (task[i]->p_osptr == task[i])
 164                         printk("Warning, pid %d os link points to self\n",
 165                                 task[i]->pid);
 166                 if (task[i]->p_osptr) {
 167                         if (task[i]->p_pptr != task[i]->p_osptr->p_pptr)
 168                                 printk(
 169                         "Warning, pid %d older sibling %d parent is %d\n",
 170                                 task[i]->pid, task[i]->p_osptr->pid,
 171                                 task[i]->p_osptr->p_pptr->pid);
 172                         if (task[i]->p_osptr->p_ysptr != task[i])
 173                                 printk(
 174                 "Warning, pid %d older sibling %d has mismatched ys link\n",
 175                                 task[i]->pid, task[i]->p_osptr->pid);
 176                 }
 177                 if (task[i]->p_ysptr) {
 178                         if (task[i]->p_pptr != task[i]->p_ysptr->p_pptr)
 179                                 printk(
 180                         "Warning, pid %d younger sibling %d parent is %d\n",
 181                                 task[i]->pid, task[i]->p_osptr->pid,
 182                                 task[i]->p_osptr->p_pptr->pid);
 183                         if (task[i]->p_ysptr->p_osptr != task[i])
 184                                 printk(
 185                 "Warning, pid %d younger sibling %d has mismatched os link\n",
 186                                 task[i]->pid, task[i]->p_ysptr->pid);
 187                 }
 188                 if (task[i]->p_cptr) {
 189                         if (task[i]->p_cptr->p_pptr != task[i])
 190                                 printk(
 191                         "Warning, pid %d youngest child %d has mismatched parent link\n",
 192                                 task[i]->pid, task[i]->p_cptr->pid);
 193                         if (task[i]->p_cptr->p_ysptr)
 194                                 printk(
 195                         "Warning, pid %d youngest child %d has non-NULL ys link\n",
 196                                 task[i]->pid, task[i]->p_cptr->pid);
 197                 }
 198         }
 199 }
 200 #endif /* DEBUG_PROC_TREE */
 201 
 202 /*
 203  * This checks not only the pgrp, but falls back on the pid if no
 204  * satisfactory pgrp is found. I dunno - gdb doesn't work correctly
 205  * without this...
 206  */
 207 int session_of_pgrp(int pgrp)
     /* [previous][next][first][last][top][bottom][index][help] */
 208 {
 209         struct task_struct *p;
 210         int fallback;
 211 
 212         fallback = -1;
 213         for_each_task(p) {
 214                 if (p->session <= 0)
 215                         continue;
 216                 if (p->pgrp == pgrp)
 217                         return p->session;
 218                 if (p->pid == pgrp)
 219                         fallback = p->session;
 220         }
 221         return fallback;
 222 }
 223 
 224 /*
 225  * kill_pg() sends a signal to a process group: this is what the tty
 226  * control characters do (^C, ^Z etc)
 227  */
 228 int kill_pg(int pgrp, int sig, int priv)
     /* [previous][next][first][last][top][bottom][index][help] */
 229 {
 230         struct task_struct *p;
 231         int err,retval = -ESRCH;
 232         int found = 0;
 233 
 234         if (sig<0 || sig>32 || pgrp<=0)
 235                 return -EINVAL;
 236         for_each_task(p) {
 237                 if (p->pgrp == pgrp) {
 238                         if ((err = send_sig(sig,p,priv)) != 0)
 239                                 retval = err;
 240                         else
 241                                 found++;
 242                 }
 243         }
 244         return(found ? 0 : retval);
 245 }
 246 
 247 /*
 248  * kill_sl() sends a signal to the session leader: this is used
 249  * to send SIGHUP to the controlling process of a terminal when
 250  * the connection is lost.
 251  */
 252 int kill_sl(int sess, int sig, int priv)
     /* [previous][next][first][last][top][bottom][index][help] */
 253 {
 254         struct task_struct *p;
 255         int err,retval = -ESRCH;
 256         int found = 0;
 257 
 258         if (sig<0 || sig>32 || sess<=0)
 259                 return -EINVAL;
 260         for_each_task(p) {
 261                 if (p->session == sess && p->leader) {
 262                         if ((err = send_sig(sig,p,priv)) != 0)
 263                                 retval = err;
 264                         else
 265                                 found++;
 266                 }
 267         }
 268         return(found ? 0 : retval);
 269 }
 270 
 271 int kill_proc(int pid, int sig, int priv)
     /* [previous][next][first][last][top][bottom][index][help] */
 272 {
 273         struct task_struct *p;
 274 
 275         if (sig<0 || sig>32)
 276                 return -EINVAL;
 277         for_each_task(p) {
 278                 if (p && p->pid == pid)
 279                         return send_sig(sig,p,priv);
 280         }
 281         return(-ESRCH);
 282 }
 283 
 284 /*
 285  * POSIX specifies that kill(-1,sig) is unspecified, but what we have
 286  * is probably wrong.  Should make it like BSD or SYSV.
 287  */
 288 asmlinkage int sys_kill(int pid,int sig)
     /* [previous][next][first][last][top][bottom][index][help] */
 289 {
 290         int err, retval = 0, count = 0;
 291 
 292         if (!pid)
 293                 return(kill_pg(current->pgrp,sig,0));
 294         if (pid == -1) {
 295                 struct task_struct * p;
 296                 for_each_task(p) {
 297                         if (p->pid > 1 && p != current) {
 298                                 ++count;
 299                                 if ((err = send_sig(sig,p,0)) != -EPERM)
 300                                         retval = err;
 301                         }
 302                 }
 303                 return(count ? retval : -ESRCH);
 304         }
 305         if (pid < 0) 
 306                 return(kill_pg(-pid,sig,0));
 307         /* Normal kill */
 308         return(kill_proc(pid,sig,0));
 309 }
 310 
 311 /*
 312  * Determine if a process group is "orphaned", according to the POSIX
 313  * definition in 2.2.2.52.  Orphaned process groups are not to be affected
 314  * by terminal-generated stop signals.  Newly orphaned process groups are 
 315  * to receive a SIGHUP and a SIGCONT.
 316  * 
 317  * "I ask you, have you ever known what it is to be an orphan?"
 318  */
 319 int is_orphaned_pgrp(int pgrp)
     /* [previous][next][first][last][top][bottom][index][help] */
 320 {
 321         struct task_struct *p;
 322 
 323         for_each_task(p) {
 324                 if ((p->pgrp != pgrp) || 
 325                     (p->state == TASK_ZOMBIE) ||
 326                     (p->p_pptr->pid == 1))
 327                         continue;
 328                 if ((p->p_pptr->pgrp != pgrp) &&
 329                     (p->p_pptr->session == p->session))
 330                         return 0;
 331         }
 332         return(1);      /* (sighing) "Often!" */
 333 }
 334 
 335 static int has_stopped_jobs(int pgrp)
     /* [previous][next][first][last][top][bottom][index][help] */
 336 {
 337         struct task_struct * p;
 338 
 339         for_each_task(p) {
 340                 if (p->pgrp != pgrp)
 341                         continue;
 342                 if (p->state == TASK_STOPPED)
 343                         return(1);
 344         }
 345         return(0);
 346 }
 347 
 348 static void forget_original_parent(struct task_struct * father)
     /* [previous][next][first][last][top][bottom][index][help] */
 349 {
 350         struct task_struct * p;
 351 
 352         for_each_task(p) {
 353                 if (p->p_opptr == father)
 354                         if (task[smp_num_cpus]) /* init */
 355                                 p->p_opptr = task[smp_num_cpus];
 356                         else
 357                                 p->p_opptr = task[0];
 358         }
 359 }
 360 
 361 void exit_files(struct task_struct *tsk)
     /* [previous][next][first][last][top][bottom][index][help] */
 362 {
 363         struct files_struct * files = tsk->files;
 364 
 365         if (files) {
 366                 tsk->files = NULL;
 367                 if (!--files->count) {
 368                         int i;
 369                         for (i=0 ; i<NR_OPEN ; i++) {
 370                                 struct file * filp = files->fd[i];
 371                                 if (!filp)
 372                                         continue;
 373                                 files->fd[i] = NULL;
 374                                 close_fp(filp);
 375                         }
 376                         kfree(files);
 377                 }
 378         }
 379 }
 380 
 381 void exit_fs(struct task_struct *tsk)
     /* [previous][next][first][last][top][bottom][index][help] */
 382 {
 383         struct fs_struct * fs = tsk->fs;
 384 
 385         if (fs) {
 386                 tsk->fs = NULL;
 387                 if (!--fs->count) {
 388                         iput(fs->root);
 389                         iput(fs->pwd);
 390                         kfree(fs);
 391                 }
 392         }
 393 }
 394 
 395 void exit_sighand(struct task_struct *tsk)
     /* [previous][next][first][last][top][bottom][index][help] */
 396 {
 397         struct signal_struct * sig = tsk->sig;
 398 
 399         if (sig) {
 400                 tsk->sig = NULL;
 401                 if (!--sig->count) {
 402                         kfree(sig);
 403                 }
 404         }
 405 }
 406 
 407 static void exit_mm(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 408 {
 409         struct mm_struct * mm = current->mm;
 410 
 411         current->swappable = 0;
 412         if (mm) {
 413                 if (!--mm->count) {
 414                         exit_mmap(mm);
 415                         free_page_tables(current);
 416                         kfree(mm);
 417                 }
 418                 current->mm = NULL;
 419         }
 420 }
 421 
 422 /* 
 423  * Send signals to all our closest relatives so that they know
 424  * to properly mourn us..
 425  */
 426 static void exit_notify(void)
     /* [previous][next][first][last][top][bottom][index][help] */
 427 {
 428         struct task_struct * p;
 429 
 430         forget_original_parent(current);
 431         /* 
 432          * Check to see if any process groups have become orphaned
 433          * as a result of our exiting, and if they have any stopped
 434          * jobs, send them a SIGUP and then a SIGCONT.  (POSIX 3.2.2.2)
 435          *
 436          * Case i: Our father is in a different pgrp than we are
 437          * and we were the only connection outside, so our pgrp
 438          * is about to become orphaned.
 439          */
 440         if ((current->p_pptr->pgrp != current->pgrp) &&
 441             (current->p_pptr->session == current->session) &&
 442             is_orphaned_pgrp(current->pgrp) &&
 443             has_stopped_jobs(current->pgrp)) {
 444                 kill_pg(current->pgrp,SIGHUP,1);
 445                 kill_pg(current->pgrp,SIGCONT,1);
 446         }
 447         /* Let father know we died */
 448         notify_parent(current);
 449         
 450         /*
 451          * This loop does two things:
 452          * 
 453          * A.  Make init inherit all the child processes
 454          * B.  Check to see if any process groups have become orphaned
 455          *      as a result of our exiting, and if they have any stopped
 456          *      jobs, send them a SIGHUP and then a SIGCONT.  (POSIX 3.2.2.2)
 457          */
 458         while ((p = current->p_cptr) != NULL) {
 459                 current->p_cptr = p->p_osptr;
 460                 p->p_ysptr = NULL;
 461                 p->flags &= ~(PF_PTRACED|PF_TRACESYS);
 462                 if (task[smp_num_cpus] && task[smp_num_cpus] != current) /* init */
 463                         p->p_pptr = task[smp_num_cpus];
 464                 else
 465                         p->p_pptr = task[0];
 466                 p->p_osptr = p->p_pptr->p_cptr;
 467                 p->p_osptr->p_ysptr = p;
 468                 p->p_pptr->p_cptr = p;
 469                 if (p->state == TASK_ZOMBIE)
 470                         notify_parent(p);
 471                 /*
 472                  * process group orphan check
 473                  * Case ii: Our child is in a different pgrp 
 474                  * than we are, and it was the only connection
 475                  * outside, so the child pgrp is now orphaned.
 476                  */
 477                 if ((p->pgrp != current->pgrp) &&
 478                     (p->session == current->session) &&
 479                     is_orphaned_pgrp(p->pgrp) &&
 480                     has_stopped_jobs(p->pgrp)) {
 481                         kill_pg(p->pgrp,SIGHUP,1);
 482                         kill_pg(p->pgrp,SIGCONT,1);
 483                 }
 484         }
 485         if (current->leader)
 486                 disassociate_ctty(1);
 487 }
 488 
 489 NORET_TYPE void do_exit(long code)
     /* [previous][next][first][last][top][bottom][index][help] */
 490 {
 491         if (intr_count) {
 492                 printk("Aiee, killing interrupt handler\n");
 493                 intr_count = 0;
 494         }
 495 fake_volatile:
 496         current->flags |= PF_EXITING;
 497         del_timer(&current->real_timer);
 498         sem_exit();
 499         exit_mm();
 500         exit_files(current);
 501         exit_fs(current);
 502         exit_sighand(current);
 503         exit_thread();
 504         exit_notify();
 505         current->state = TASK_ZOMBIE;
 506         current->exit_code = code;
 507 #ifdef DEBUG_PROC_TREE
 508         audit_ptree();
 509 #endif
 510         if (current->exec_domain && current->exec_domain->use_count)
 511                 (*current->exec_domain->use_count)--;
 512         if (current->binfmt && current->binfmt->use_count)
 513                 (*current->binfmt->use_count)--;
 514         schedule();
 515 /*
 516  * In order to get rid of the "volatile function does return" message
 517  * I did this little loop that confuses gcc to think do_exit really
 518  * is volatile. In fact it's schedule() that is volatile in some
 519  * circumstances: when current->state = ZOMBIE, schedule() never
 520  * returns.
 521  *
 522  * In fact the natural way to do all this is to have the label and the
 523  * goto right after each other, but I put the fake_volatile label at
 524  * the start of the function just in case something /really/ bad
 525  * happens, and the schedule returns. This way we can try again. I'm
 526  * not paranoid: it's just that everybody is out to get me.
 527  */
 528         goto fake_volatile;
 529 }
 530 
 531 asmlinkage int sys_exit(int error_code)
     /* [previous][next][first][last][top][bottom][index][help] */
 532 {
 533         do_exit((error_code&0xff)<<8);
 534 }
 535 
 536 asmlinkage int sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struct rusage * ru)
     /* [previous][next][first][last][top][bottom][index][help] */
 537 {
 538         int flag, retval;
 539         struct wait_queue wait = { current, NULL };
 540         struct task_struct *p;
 541 
 542         if (stat_addr) {
 543                 flag = verify_area(VERIFY_WRITE, stat_addr, sizeof(*stat_addr));
 544                 if (flag)
 545                         return flag;
 546         }
 547         add_wait_queue(&current->wait_chldexit,&wait);
 548 repeat:
 549         flag=0;
 550         for (p = current->p_cptr ; p ; p = p->p_osptr) {
 551                 if (pid>0) {
 552                         if (p->pid != pid)
 553                                 continue;
 554                 } else if (!pid) {
 555                         if (p->pgrp != current->pgrp)
 556                                 continue;
 557                 } else if (pid != -1) {
 558                         if (p->pgrp != -pid)
 559                                 continue;
 560                 }
 561                 /* wait for cloned processes iff the __WCLONE flag is set */
 562                 if ((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0))
 563                         continue;
 564                 flag = 1;
 565                 switch (p->state) {
 566                         case TASK_STOPPED:
 567                                 if (!p->exit_code)
 568                                         continue;
 569                                 if (!(options & WUNTRACED) && !(p->flags & PF_PTRACED))
 570                                         continue;
 571                                 if (stat_addr)
 572                                         put_user((p->exit_code << 8) | 0x7f,
 573                                                 stat_addr);
 574                                 p->exit_code = 0;
 575                                 if (ru != NULL)
 576                                         getrusage(p, RUSAGE_BOTH, ru);
 577                                 retval = p->pid;
 578                                 goto end_wait4;
 579                         case TASK_ZOMBIE:
 580                                 current->cutime += p->utime + p->cutime;
 581                                 current->cstime += p->stime + p->cstime;
 582                                 if (ru != NULL)
 583                                         getrusage(p, RUSAGE_BOTH, ru);
 584                                 flag = p->pid;
 585                                 if (stat_addr)
 586                                         put_user(p->exit_code, stat_addr);
 587                                 if (p->p_opptr != p->p_pptr) {
 588                                         REMOVE_LINKS(p);
 589                                         p->p_pptr = p->p_opptr;
 590                                         SET_LINKS(p);
 591                                         notify_parent(p);
 592                                 } else
 593                                         release(p);
 594 #ifdef DEBUG_PROC_TREE
 595                                 audit_ptree();
 596 #endif
 597                                 retval = flag;
 598                                 goto end_wait4;
 599                         default:
 600                                 continue;
 601                 }
 602         }
 603         if (flag) {
 604                 retval = 0;
 605                 if (options & WNOHANG)
 606                         goto end_wait4;
 607                 current->state=TASK_INTERRUPTIBLE;
 608                 schedule();
 609                 current->signal &= ~(1<<(SIGCHLD-1));
 610                 retval = -ERESTARTSYS;
 611                 if (current->signal & ~current->blocked)
 612                         goto end_wait4;
 613                 goto repeat;
 614         }
 615         retval = -ECHILD;
 616 end_wait4:
 617         remove_wait_queue(&current->wait_chldexit,&wait);
 618         return retval;
 619 }
 620 
 621 /*
 622  * sys_waitpid() remains for compatibility. waitpid() should be
 623  * implemented by calling sys_wait4() from libc.a.
 624  */
 625 asmlinkage int sys_waitpid(pid_t pid,unsigned int * stat_addr, int options)
     /* [previous][next][first][last][top][bottom][index][help] */
 626 {
 627         return sys_wait4(pid, stat_addr, options, NULL);
 628 }

/* [previous][next][first][last][top][bottom][index][help] */