bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interrupted system call when using named pipes on FreeBSD


From: Chet Ramey
Subject: Re: interrupted system call when using named pipes on FreeBSD
Date: Wed, 30 Jan 2013 11:48:02 -0500

> a simple patch to workaround/fix the issue by Yuta SATOH:
> --- bash-4.2/redir.c
> +++ bash-4.2/redir.c
> @@ -632,7 +632,9 @@
>      }
>    else
>      {
> -      fd = open (filename, flags, mode);
> +      do {
> +     fd = open (filename, flags, mode);
> +      } while ((fd < 0) && (errno == EINTR));
>  #if defined (AFS)
>        if ((fd < 0) && (errno == EACCES))
>       {
> 
> but we're not sure if this is the route to take ?  seems like if bash is 
> handling SIGCHLD, there's no avoiding this sort of check.

It seems like implementations are buggy enough that bash needs to do
something to work around them, but this isn't exactly it.

The issue with the proposed patch is that it would make it impossible to
interrupt an open using, say, ^C.  There needs to be a check for signals
in there somewhere.  I'll fix it.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]