Re: [PATCH] dropbear-051: uClinux vfork

2008-10-23 Thread Rob Landley
On Thursday 23 October 2008 03:51:17 Mike Frysinger wrote: > On Wednesday 22 October 2008, Rob Landley wrote: > > On Tuesday 21 October 2008 00:01:56 Mike Frysinger wrote: > > > - if ((pid = fork()) == -1) > > > +#ifdef __uClinux__ > > > + pid = vfork(); > > > +#else > > > + pid = fork(); > > > +#e

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-23 Thread Mike Frysinger
On Thursday 23 October 2008, Jamie Lokier wrote: > execvp() is ok, even though that > calls malloc() (in at least one Glibc version I looked at). yes, most of the exec calls need memory in order to construct an argv[] based on the function arguments. in glibc, i imagine that the memory leaked is

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-23 Thread Jamie Lokier
Rob Landley wrote: > On Tuesday 21 October 2008 00:01:56 Mike Frysinger wrote: > > - if ((pid = fork()) == -1) > > +#ifdef __uClinux__ > > + pid = vfork(); > > +#else > > + pid = fork(); > > +#endif /* __uClinux__ */ > > + if (pid == -1) > > fatal("do_local_cmd: fork: %s", strer

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-23 Thread Mike Frysinger
On Wednesday 22 October 2008, Rob Landley wrote: > On Tuesday 21 October 2008 00:01:56 Mike Frysinger wrote: > > - if ((pid = fork()) == -1) > > +#ifdef __uClinux__ > > + pid = vfork(); > > +#else > > + pid = fork(); > > +#endif /* __uClinux__ */ > > + if (pid == -1) > > fatal("

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-22 Thread Rob Landley
On Tuesday 21 October 2008 00:01:56 Mike Frysinger wrote: > - if ((pid = fork()) == -1) > +#ifdef __uClinux__ > + pid = vfork(); > +#else > + pid = fork(); > +#endif /* __uClinux__ */ > + if (pid == -1) > fatal("do_local_cmd: fork: %s", strerror(errno)); If it's ever

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-22 Thread Mike Frysinger
On Wednesday 22 October 2008, Farrell Aultman wrote: > Again, it would be better to do something like the following in includes.h: > +#ifdef __uClinux__ > +#define exit(x) _exit(x) > +#endif no it wouldnt. _exit() is *only* for when the child of a vfork() needs to exit without calling an exec fu

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-22 Thread Farrell Aultman
Again, it would be better to do something like the following in includes.h: +#ifdef __uClinux__ +#define exit(x) _exit(x) +#endif On Tue, Oct 21, 2008 at 1:01 AM, Mike Frysinger <[EMAIL PROTECTED]> wrote: > On Saturday 20 September 2008, Jamie Lokier wrote: > > Farrell Aultman wrote: > > > Betwee

Re: [PATCH] dropbear-051: uClinux vfork

2008-10-21 Thread Mike Frysinger
On Saturday 20 September 2008, Jamie Lokier wrote: > Farrell Aultman wrote: > > Between dropbear-047 and dropbear-051 changes were made that > > accounted for the fact that uClinux needs to use vfork instead of > > fork. However, fork was not replaced with vfork in all places. I > > moved the con

Re: [PATCH] dropbear-051: uClinux vfork

2008-09-20 Thread Jamie Lokier
Farrell Aultman wrote: > Between dropbear-047 and dropbear-051 changes were made that > accounted for the fact that uClinux needs to use vfork instead of > fork. However, fork was not replaced with vfork in all places. I > moved the conditional preproccessor check for uClinux into the > includes.

[PATCH] dropbear-051: uClinux vfork

2008-09-19 Thread Farrell Aultman
Between dropbear-047 and dropbear-051 changes were made that accounted for the fact that uClinux needs to use vfork instead of fork. However, fork was not replaced with vfork in all places. I moved the conditional preproccessor check for uClinux into the includes.h file, so that fork is always re