[haiku-development] Re: VIm episodes: I. How to guess the name of parent process ...

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 14 Apr 2009 18:23:52 +0200 CEST

Siarzhuk Zharski <zharik@xxxxxx> wrote:
> I have build Vim 7.2 with BeOS GUI on Haiku. Current version of BeOS 
> GUI 
> code in Vim 6.4 use following trick to determine if Vim was started 
> from 
> the Tracker:
[...]
>     if (!isatty(0)) {
>     struct stat stat_stdin, stat_dev_null;
> 
>     if (fstat(0, &stat_stdin) == -1 ||
>         stat("/dev/null", &stat_dev_null) == -1 ||
>         (stat_stdin.st_dev == stat_dev_null.st_dev &&
>          stat_stdin.st_ino == stat_dev_null.st_ino))
>         gui.starting = TRUE;
>     }
> ---------
> But this doesn't work with Haiku.

This code works fine under Haiku, I just tested it.
Are you sure you haven't changed your Bootscript and redirected its 
output to /dev/dprintf or something like that?

Bye,
   Axel.


Other related posts: