On 2014-04-05 01:54:08 -0600 Richard Frith-Macdonald <richardfrithmacdon...@gmail.com> wrote:
> > On 5 Apr 2014, at 07:50, Germán Arias <germanan...@gmx.es> wrote: > >> On PC if you build a tool that writes more than one line. for example: >> >> NSLog(@"One"); >> NSLog(@"Two"); >> NSLog(@"Three"); >> >> And run this at launch panel, only the first line is printed. The problem >> is that NSTaskDidTerminateNotification is sent after print the first line, >> even when Task is still running. > > That seems to require a major bug in windows (since the notification is sent > only after windows says the process has terminated). Sorry, I forgot say this problem is on my GNU/Linux system. Today I tested this on Windows, and works perfectly. > > More likely something's messing with the output. If you are reading the > output of the task via a pipe, most like the sequence of events is: > > 1. subtask writes three lines to pipe > 2. parent reads first line and prints it > 3. subtask terminates > 4. parent receives notification and closes pipe without reading remaining two > lines > > But I expect there are other possible ways that you could lose buffered > output when a task ends; I suggest you examine the I/O you are doing. > > Another possibility would be if you are launching an intermediate subtask (eg > a shell which then runs the tool asynchronously) which terminates. > > 1. launch the shell subtask > 2. shell launches the tool > 3. shell terminates > 4. parent receives notification > 5. tool terminates > I will check this. Germán. _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev