jobs.h revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz* Copyright (c) 1982-2009 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Interface to job control for shell
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * written by David Korn
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* !SIGINT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /* Ninth edition */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# endif /* FIOLOOKLD */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct process *p_nxtproc; /* next process in current job */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin unsigned short p_exit; /* exit value or signal number */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin unsigned short p_exitmin; /* minimum exit value for xargs */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* JOBS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin unsigned int in_critical; /* >0 => in critical region */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#endif /* SHOPT_BGX */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* JOBS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* flags for joblist */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz if (!--job.in_critical && (sig = job.savesig)) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_jobusage[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_done[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_running[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_coredump[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_no_proc[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_no_job[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_jobsrunning[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_nlspace[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_access[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_terminate[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_no_jctl[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern const char e_signo[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern const char e_no_start[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SIGTSTP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern const char e_newtty[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern const char e_oldtty[];
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* NTTYDISC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* JOBS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The following are defined in jobs.c
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void job_clear(void);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void job_bwait(char**);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int job_walk(Sfio_t*,int(*)(struct process*,int),int,char*[]);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void *job_subsave(void);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void job_subrestore(void*);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern void job_chldtrap(Shell_t*, const char*,int);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz#endif /* SHOPT_BGX */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern int job_reap(int);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# define job_close(s) (0)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* JOBS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* !JOB_NFLAG */