Re: Patch for process title on FreeBSD
Hi Kris, Kris Moore schreef: > How exactly would you like that done? I'm not much of a C programmer, I > live more in the C++ / Shell world :) > With autoconf of course (configure.ac). Cheers, Maarten.
Re: Patch for process title on FreeBSD
How exactly would you like that done? I'm not much of a C programmer, I live more in the C++ / Shell world :) -- Kris Moore PC-BSD Software http://www.pcbsd.com Alexandre Julliard wrote: > Kris Moore <[EMAIL PROTECTED]> writes: > >> --- dlls/kernel32/process.c.orig 2007-12-12 12:34:45.0 -0500 >> +++ dlls/kernel32/process.c 2007-12-12 12:35:17.0 -0500 >> @@ -853,6 +853,11 @@ >> */ >> static void set_process_name( int argc, char *argv[] ) >> { >> + >> +#if defined(__FreeBSD__) >> +setproctitle("-%s", argv[1]); >> +#endif > > You should add a configure check for this function, instead of checking > for __FreeBSD__. >
Re: Patch for process title on FreeBSD
Kris Moore <[EMAIL PROTECTED]> writes: > --- dlls/kernel32/process.c.orig 2007-12-12 12:34:45.0 -0500 > +++ dlls/kernel32/process.c 2007-12-12 12:35:17.0 -0500 > @@ -853,6 +853,11 @@ > */ > static void set_process_name( int argc, char *argv[] ) > { > + > +#if defined(__FreeBSD__) > +setproctitle("-%s", argv[1]); > +#endif You should add a configure check for this function, instead of checking for __FreeBSD__. -- Alexandre Julliard [EMAIL PROTECTED]
Re: Patch for process title on FreeBSD
Stefan Dösinger wrote: > Am Mittwoch, 12. Dezember 2007 18:50:39 schrieb Kris Moore: >> Hey all! >> >> One of our devs noticed that on FreeBSD we don't get the process name >> set properly, so in "ps" we get a lot of wine-pthread garbage. Here's a >> small patch to fix this in dlls/kernel32/process.c >> >> I tried to make this as small & simple as possible, please let me know >> what you think! > I think using argv[1] is not the best way, as some wine parameter might be > added in the future, or someone might use something like binfmt_misc on Linux > to launch the app. In that case the .exe name is propably argv[0], but I am > not sure. Any suggestions on how we should weed through this / add this function? It looks like the rest of the function assumes removing argv[0] as well, if I'm reading it right. I've tested this fix out on FreeBSD here, and it looks like it works, showing a process as the actual win exe instead of wine-pthread now. -- Kris Moore PC-BSD Software http://www.pcbsd.com
Re: Patch for process title on FreeBSD
Am Mittwoch, 12. Dezember 2007 18:50:39 schrieb Kris Moore: > Hey all! > > One of our devs noticed that on FreeBSD we don't get the process name > set properly, so in "ps" we get a lot of wine-pthread garbage. Here's a > small patch to fix this in dlls/kernel32/process.c > > I tried to make this as small & simple as possible, please let me know > what you think! I think using argv[1] is not the best way, as some wine parameter might be added in the future, or someone might use something like binfmt_misc on Linux to launch the app. In that case the .exe name is propably argv[0], but I am not sure. signature.asc Description: This is a digitally signed message part.