Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Synchronous vs. Asynchronous
- X-seq: zsh-users 15316
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Synchronous vs. Asynchronous
- Date: Sat, 21 Aug 2010 22:02:55 -0700
- In-reply-to: <20100821223146.GD16241@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <100820083501.ZM29362@xxxxxxxxxxxxxxxxxxxxxx> <20100820164507.419dc0bc@xxxxxxx> <100820103638.ZM29775@xxxxxxxxxxxxxxxxxxxxxx> <20100821194122.583e05e4@pws-pc> <20100821223146.GD16241@xxxxxxxxxxxxxxxxxxx>
On Aug 22, 12:31am, Vincent Lefevre wrote:
}
} Under Mac OS X, I get:
}
} prunille% cat >(sleep 100)
} cat: /dev/fd/31: Permission denied
I'm pretty sure PWS meant >>(sleep 100); cat is going to try to read
from its filename argument, and >(...) is opening a write-only socket,
so what's more surprising is that it doesn't give an error elsewhere.
macadamia[502] ls -l >(sleep 100)
prw-rw---- 0 schaefer staff 0 Aug 21 21:47 /dev/fd/12|
} Under Linux:
}
} xvii% cat >(sleep 100)
} ^C^C^C^C^C
torch[594] ls -l >(sleep 10)
l-wx------ 1 schaefer schaefer 64 Aug 21 21:52 /proc/self/fd/12 -> pipe:[1059569]
Seems like "cat" should have complained about a read-only file there, I
wonder why it doesn't. Oh:
torch[599] ls -Ll >(sleep 10) 4.2.0
prw------- 1 schaefer schaefer 0 Aug 21 21:55 /proc/self/fd/12|
So the pipe to which /dev/fd/12 points behaves as readable on Linux.
} prunille% printf "a%s\n" {1..9} >>(while read s; do sleep 1; echo $s; done)
} a1
} a2
} a3
} ^Ca4
} ^C^C^Ca5
} ^C^C^Ca6
} ^C^Ca7
} a8
} a9
} prunille%
}
} is uninterruptible
Hmm, under 4.3.9 that's interruptible on MacOS:
macadamia[505] printf "a%s\n" {1..9} >>(while read s; do sleep 1; echo $s; done)
a1
a2
a3
^C%
macadamia[506] a4
a5
a6
a7
a8
a9
With the latest CVS, it is not interruptible. I'm not sure which change
would have brought that on.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author