zsh-workers
 help / color / mirror / code / Atom feed
* [4.2.0] Src/hist.c:lockhistfile() endless loop
@ 2004-05-07 10:35 KELEMEN Peter
  2004-05-07 15:41 ` Wayne Davison
  0 siblings, 1 reply; 2+ messages in thread
From: KELEMEN Peter @ 2004-05-07 10:35 UTC (permalink / raw)
  To: zsh-workers

[ Please Cc: me since I'm not subscribed.  Thanks. ]

Hello,

  2141              while (link(tmpfile, lockfile) < 0) {
  2142                  if (stat(lockfile, &sb) < 0) {
  2143                      if (errno == ENOENT)
  2144                          continue;

This looks like an endless loop if
 1) link() fails, and
 2) stat() returns -ENOENT.

It was the case for me with $HOME being on OpenAFS and an expired
ticket (link() returned -EACCES).  What guarantees do we have here
to say that link() will eventually succeed?

Peter

-- 
    .+'''+.         .+'''+.         .+'''+.         .+'''+.         .+''
 Kelemen Péter     /       \       /       \     Peter.Kelemen@cern.ch
.+'         `+...+'         `+...+'         `+...+'         `+...+'


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-07 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 10:35 [4.2.0] Src/hist.c:lockhistfile() endless loop KELEMEN Peter
2004-05-07 15:41 ` Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).