Rev 3843 | Rev 7079 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3843 | Rev 7076 | ||
---|---|---|---|
Line 243... | Line 243... | ||
243 | int i; |
243 | int i; |
244 | struct stat st; |
244 | struct stat st; |
245 | char *cm, *p, *p2, abuf[MAX_LINELEN+1]; |
245 | char *cm, *p, *p2, abuf[MAX_LINELEN+1]; |
246 | char *arg[1024]; |
246 | char *arg[1024]; |
247 | 247 | ||
248 | for(cm=cmdf; isspace(*cm); cm++) |
248 | for(cm=cmdf; isspace(*cm); cm++); |
- | 249 | if(*cmdf==0) return -1; |
|
249 | fflush(NULL); /* flush all output streams before forking |
250 | fflush(NULL); /* flush all output streams before forking |
250 | * otherwise they will be doubled */ |
251 | * otherwise they will be doubled */ |
251 | pid=fork(); if(pid==-1) return -1; |
252 | pid=fork(); if(pid==-1) return -1; |
252 | if(!pid) { /* child */ |
253 | if(!pid) { /* child */ |
253 | if(!inf) { |
254 | if(!inf) { |