Skip to main content
16 events
when toggle format what by license comment
Mar 19, 2018 at 15:52 vote accept forthrin
Mar 19, 2018 at 15:32 comment added Stéphane Chazelas If you run nano directly on the command line in a terminal, of course it receives a stdin. Its stdin is the terminal device, something like /dev/ttyX or /dev/pts/X. If not you wouldn't be able to interact with it. In any case, looks like my answer is what you're looking for.
Mar 19, 2018 at 15:28 comment added forthrin @StéphaneChazelas: nano should simply run without receiving any STDIN, just like if you ran nano by itself on the command line. The STDIN is for the PHP script alone, not its sub-shells.
Mar 19, 2018 at 15:25 history edited forthrin CC BY-SA 3.0
added 73 characters in body
Mar 19, 2018 at 15:17 history edited forthrin CC BY-SA 3.0
added 125 characters in body
Mar 19, 2018 at 15:14 comment added Stéphane Chazelas You mean nano should have its stdin closed? opened on /dev/null, on some tty device?
Mar 19, 2018 at 15:12 history edited forthrin CC BY-SA 3.0
added 125 characters in body
Mar 19, 2018 at 15:11 answer added Stéphane Chazelas timeline score: 1
Mar 19, 2018 at 15:10 comment added forthrin @StéphaneChazelas: Nothing :) The shell should run completely unrelated to the initial STDIN to the PHP script.
Mar 19, 2018 at 15:01 comment added Stéphane Chazelas Well, yes processes inherit the file descriptors of their parent. What would you want its stdin to be?
Mar 19, 2018 at 14:46 comment added Gerard H. Pille @forthrin True, but if you read the passthru manual page, what does it say about the output?
Mar 19, 2018 at 14:42 comment added Kiwy @forthrin did you see that: stackoverflow.com/q/11968244/1195001 They are not using the same code as you. I think your problem is more about php than pipe
Mar 19, 2018 at 14:39 comment added forthrin It's a PHP way of doing sub-shells. None of the supported methods work as expected.
Mar 19, 2018 at 14:38 history edited forthrin CC BY-SA 3.0
added 74 characters in body
Mar 19, 2018 at 14:04 comment added Gerard H. Pille Why did you type the characters p,a,s,s,t,h,r and u in your script?
Mar 19, 2018 at 13:38 history asked forthrin CC BY-SA 3.0