|
From: Daniel J S. <dan...@ie...> - 2007-03-09 06:45:41
|
Daniel J Sebald wrote:
> Ethan A Merritt wrote:
>
>>On Thursday 08 March 2007 21:59, Daniel J Sebald wrote:
>>
>>
>>>Oh yeah, I see now. That isn't the same error message as
>>>when gnuplot can't find gnuplot_x11. gnuplot_x11 is the one having
>>>problems opening the X display. Is there some way for Allin to
>>>confirm that the version of gnuplot_x11 for 4.2 was installed properly
>>>and it is not the 4.0 version of gnuplot_x11?
>>
>>
>>Doesn't matter. No matter how badly gnuplot_x11 dies, it shouldn't
>>do more than generate an error message on the gnuplot end.
>>Apparently that's not the case, but I haven't yet understood the
>>failure path.
>
>
> Yeah, that's right. Well, there are a number of conditional compiles in X11_init() that would explain that behavior. There appears to be only one "graceful" exit out of gnuplot from that point:
>
>
> if (fork() == 0) {
> /* child */
> [snip]
> fprintf(stderr,"Expected X11 driver: %s\n",X11_full_command_path);
> perror("Exec failed");
> fprintf(stderr,"See 'help x11' for more details\n");
> exit(EXIT_FAILURE);
> }
>
> But that set group of error messages isn't appearing in Allin's strace.
>
> Might it be that fork() is coming back nozero and gnuplot attempts sending through the pipe and the OS doesn't like that so kills the process?
Yes, I think it is something along that line. The only difference between 4.0 and 4.2 is the addition of the following at the end of X11_init():
#if defined(WITH_IMAGE) || defined(BINARY_X11_POLYGON)
X11_send_endianess();
#endif
which sends a few characters through the pipe. This code probably shouldn't be run unless there is a valid pipe.
Probably on your system Ethan and mine this is handled more gracefully.
Allin, please try the following patch and rebuild gnuplot to see if this fixes matters.
Dan
|