Conference Room SAD


[Thread display] [Reply] [New arrival display] [Word search] [Notes] [管理用]

No. 907
Title Re: V1.1.1.6k64 Thank you and have a happy new year!
Date : 2018/12/26(Wed) 14:43:41
Name Akio Morita
URL
> Changes:
> 1. Use S. Yamada's patch on utils.c to avoid piling up of temp files. He saids that using a pipe instead of a file was better to receive results of shell commands, but it has not been included so far, due to a bad experience of mine on pipe in an old system, probably HP-UX.
>
この"bad experience"というのは、backgroundな sub-processでは無く、foreground sub-processの出力先にpipeを使ったケースではないでしょうか?

pipeへのwrite(2)は、kernelのI/O bufferが埋まるとreader側が読みにくるまでblocking waitに入るので、foreground sub-processの出力をpipeへ向けた場合、write(2)のblockingによりsub-processが終了しないために、pipeのreaderである main-processも進行せずにデッドロックします

MAIN trunk系の実装は、sub-processがforeground時はunlink済みのファイル記述子、sub-processがbackground時はpipe(2)が生成するファイル記述子を使って実装しています(参考までに)

- Related List tree (Click ▼ to display all articles in a thread.)


- Reply Form (Reply to the above using the following.)
Name
E-Mail
Subject
Message
URL
Password (alphanumeric characters within 8)
Subscribe Key (Enter the number of the right image) Post key


- Modify or delete a contributeted article using the following form. -
Do No Password

- WebForum -