Ignore:
Timestamp:
Apr 29, 2007, 10:43:43 PM (18 years ago)
Author:
bird
Message:

Applied Brendan's patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/app-shells/bash/jobs.c

    r3231 r3232  
    3232#if defined (HAVE_UNISTD_H)
    3333#  include <unistd.h>
     34#endif
     35
     36#ifdef __OS2__
     37extern int _setpgid(pid_t pid, pid_t pgid);
    3438#endif
    3539
     
    15621566  map_over_jobs (print_job, format, -1);
    15631567}
     1568
     1569#ifdef __OS2__
     1570/* Overrides the kLIBC setpgid() ENOSYS stub. This implements the
     1571   simple calls that requires no real work. */
     1572int
     1573setpgid (pid, pgid)
     1574    pid_t pid, pgid;
     1575{
     1576  /* FIXME: if ppid != getpid(), check that it exists. */
     1577  if (pid == pgid || pgid == getpid())
     1578    return 0;
     1579  return _setpgid (pid, pgid);
     1580}
     1581#endif
    15641582
    15651583/* Fork, handling errors.  Returns the pid of the newly made child, or 0.
Note: See TracChangeset for help on using the changeset viewer.