Re: SIGCHLD trap in a shell

2017-04-26 Thread Vincent Lefevre
On 2017-04-25 21:32:56 -0400, Chet Ramey wrote:
> There is no requirement that a trap be executed each time a particular
> signal is generated.  There is no requirement that the system keep a
> count of instances of a particular pending signal; only that the signal
> is pending.  SIGCHLD isn't different from any other signal in this
> regard.

In such a case, how can you know the number of remaining processes?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



[1003.1(2016)/Issue7+TC2 0001121]: is the stat data undefined for dangling symlinks, without FTW_PHYS?

2017-04-26 Thread Austin Group Bug Tracker

A NOTE has been added to this issue. 
== 
http://austingroupbugs.net/view.php?id=1121 
== 
Reported By:djdelorie
Assigned To:ajosey
== 
Project:1003.1(2016)/Issue7+TC2
Issue ID:   1121
Category:   System Interfaces
Type:   Clarification Requested
Severity:   Editorial
Priority:   normal
Status: Under Review
Name:   DJ Delorie 
Organization:   Red Hat Inc 
User Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1422736 
Section:nftw() 
Page Number:http://pubs.opengroup.org/onlinepubs/9699919799/ 
Line Number:n/a 
Interp Status:  --- 
Final Accepted Text: 
== 
Date Submitted: 2017-02-24 18:47 UTC
Last Modified:  2017-04-26 17:06 UTC
== 
Summary:is the stat data undefined for dangling symlinks,
without FTW_PHYS?
== 

-- 
 (0003675) djdelorie (reporter) - 2017-04-26 17:06
 http://austingroupbugs.net/view.php?id=1121#c3675 
-- 
Any progress on this? 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2017-02-24 18:47 djdelorie  New Issue
2017-02-24 18:47 djdelorie  Status   New => Under Review 
2017-02-24 18:47 djdelorie  Assigned To   => ajosey  
2017-02-24 18:47 djdelorie  Name  => DJ Delorie  
2017-02-24 18:47 djdelorie  Organization  => Red Hat Inc 
2017-02-24 18:47 djdelorie  User Reference=>
https://bugzilla.redhat.com/show_bug.cgi?id=1422736
2017-02-24 18:47 djdelorie  Section   => nftw()  
2017-02-24 18:47 djdelorie  Page Number   =>
http://pubs.opengroup.org/onlinepubs/9699919799/
2017-02-24 18:47 djdelorie  Line Number   => n/a 
2017-02-24 20:38 shware_systems Note Added: 0003570  
2017-02-25 03:06 carlos Note Added: 0003571  
2017-02-26 19:59 mtkNote Added: 0003574  
2017-02-27 09:50 geoffclare Project  1003.1(2008)/Issue 7 =>
1003.1(2016)/Issue7+TC2
2017-04-26 17:06 djdelorie  Note Added: 0003675  
==




Re: SIGCHLD trap in a shell

2017-04-26 Thread Chet Ramey
On 4/25/17 9:21 AM, Vincent Lefevre wrote:

> * With bash and posh, I get:
> 
> 0
> 0
> 0
> 0
> 0
> 0
> [...]
> 
> i.e. no trap executions at all.
> 
> If I add "set -m", then bash behaves like ash, etc., except that it
> no longer reacts to Ctrl-C (the Ctrl-C only interrupts the sleep).

I'm curious what you think the shell should do in this case. Remember
that it doesn't get the SIGINT. Other shells seem to fake it and act
like they received a SIGINT, and abort the entire script. Should bash
stop the loop, should it kill itself with SIGINT, or should it continue?

> Anyway, "set -m" is not supposed to be used in shell scripts (see
> rationale for the "set" built-in).

That's not quite what the rationale says.  The -m option is only required
if you support the UPE, but if you do, there's nothing that says scripts
can't or shouldn't use it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/