handle /dev/stdin always
This commit is contained in:
parent
0faf0f0baa
commit
134c20c605
2 changed files with 3 additions and 3 deletions
|
|
@ -316,11 +316,11 @@ void execdot(void){
|
|||
strcpy(file, path->word);
|
||||
if(file[0]) strcat(file, "/");
|
||||
strcat(file, zero);
|
||||
if((fd=open(file, 0))>=0) break;
|
||||
if(strcmp(file, "/dev/stdin")==0){ /* for sun & ucb */
|
||||
fd=Dup1(0);
|
||||
if(fd>=0) break;
|
||||
}
|
||||
if((fd=open(file, 0))>=0) break;
|
||||
}
|
||||
if(fd<0){
|
||||
pfmt(err, "%s: ", zero);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue