handle /dev/stdin always

This commit is contained in:
rsc 2005-02-13 21:38:32 +00:00
parent 0faf0f0baa
commit 134c20c605
2 changed files with 3 additions and 3 deletions

View file

@ -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);