hi all,

recently, I have asked couple of questions about handling inputs and 
outputs, but unfortunately have got not much feedback to them (maybe 
because of the technical nature of these questions). Few days ago I was 
reviewing 10 years old code which handles named pipe inputs with some 
thoughts of slightly modifying it.

The users who have used named pipe inputs probably know that SEC keeps 
the named pipe inputs open at all times, even when the writers 
disappear. However, it is hard to achieve with a pipe opened in 
read-only mode, since after all writers have closed the pipe, every 
subsequent read always returns EOF, and calls to select(2) always 
indicate the availability of data. To fix this issue, the pipe has to be 
closed and reopened.

In the current code, SEC uses a slightly different approach -- it opens 
the pipe in read-write mode, although in never writes into the pipe. 
However, this guarantees that there is always at least one writer on the 
pipe, and thus reopening is not needed. Nevertheless, recently I noticed 
in some man pages that POSIX does not encourage opening named pipes in 
read-write mode. Also, read-write mode has one small drawback -- SEC 
must have a write-permission for the pipe, although this permission is 
of course never used. This requirement must be therefore confusing to 
the users, although it is explained in the FAQ.

I'd like to ask a question from the users -- would you favor a change in 
the named pipe handling and the use of the read-only mode, or do you 
think the current approach is good enough? I would especially welcome 
comments from the people with system programming experience. You can 
also reply to my private e-mail, if you don't want to discuss the issue 
in the mailing list.

kind regards,
risto

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to