Zhaoming Luo, le lun. 03 févr. 2025 20:05:38 +0800, a ecrit: > I did the experiments using my own C waiting program and `sleep` shell > command respectively. They gave me the same result. It seems the sleep > program was not executed at all.
Or it just didn't get the time to do anything. > Another interesting thing I found is the difference between the vim logs > in the cases. > > Hurd (failed): > ``` > ... > 24.490000 : Starting job: /bin/sh -c /home/1speaker/my_sleep/main > 24.500000 on 0: Created channel > 24.500000 on 0: using pty /dev/ttyp3 on fd 4 > 24.500000 : SafeState: Start triggering > 24.500000 : raw terminal output: "^[[?25l^[[1;1H^[[34h^[[?25h" > 24.500000 : looking for messages on channels > 24.500000 on 0: Closing channel because all readable fds are closed > 24.500000 on 0: Closing channel > 24.500000 : SafeState: back to waiting, triggering SafeStateAgain > 24.500000 : closing logfile vimlog > 24.510000 : looking for messages on channels > 24.510000 on 0: Job ended > ... > ``` > > GNU/Linux (success): > ``` > ... > 8.807417131 : Starting job: /bin/sh -c /home/1speaker/my_sleep/main > 8.807635262 on 0: Created channel > 8.807640822 on 0: using pty /dev/pts/6 on fd 4 > 8.809397111 : SafeState: Start triggering > 8.809395859 : closing logfile vimlog > 8.809519562 : raw terminal output: "[?25l[1;1H[?12l[?25h" > 8.809534540 : looking for messages on channels > 8.809556542 : SafeState: back to waiting, triggering SafeStateAgain > ....... (some key input terminal output Safestate stuff) > 11.638185297 : looking for messages on channels > 11.638224641 : SafeState: back to waiting, triggering SafeStateAgain > 11.820336612 on 0: Job ended > 11.820453161 : looking for messages on channels > 11.820458742 on 0: Closing channel because all readable fds are closed > 11.820463010 on 0: Closing channel > ... > ``` > > On the Hurd the channels are closed before 'Job ended', but on GNU/Linux > 'Job ended' is before 'Closing channel'. Indeed, possibly it's "all readable fds are closed" that somehow is detected differently on GNU/Linux and GNU/Hurd. I'm just surprised since it has out_io and err_io set to null. Samuel