mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-24 00:44:23 +00:00
Upload
Digital Research
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// maketask call for unix
|
||||
int maketask(fname,flags,priority,argptrs)
|
||||
char *fname;
|
||||
int flags,priority;
|
||||
char **argptrs;
|
||||
{
|
||||
|
||||
register int pid;
|
||||
|
||||
if(flags==0) { //fork and exec
|
||||
if((pid=fork()) == 0) { //child process
|
||||
doexecv:
|
||||
execv(fname,argptrs);
|
||||
printf("execv failed\n");
|
||||
exit(-1);
|
||||
}
|
||||
return(pid); //return child process id
|
||||
}
|
||||
if(flags==2) { //fork only
|
||||
return(fork());
|
||||
}
|
||||
if(flags==4) { //exec only
|
||||
goto doexecv;
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
Reference in New Issue
Block a user