Re: svn commit: r286601 - head/usr.bin/patch

2015-08-11 Thread Bruce Evans
On Mon, 10 Aug 2015, Xin Li wrote: On 8/10/15 22:51, Ed Schouten wrote: 2015-08-11 1:20 GMT+02:00 Xin Li : Do you have a better solution for this? No, this is not ideal but I didn't find a better alternative (or maybe I have missed something obvious?) I think with the current POSIX definitio

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 8/10/15 22:51, Ed Schouten wrote: > 2015-08-11 1:20 GMT+02:00 Xin Li : >> Do you have a better solution for this? No, this is not ideal >> but I didn't find a better alternative (or maybe I have missed >> something obvious?) >> >> I think wi

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Ed Schouten
2015-08-11 1:20 GMT+02:00 Xin Li : > Do you have a better solution for this? No, this is not ideal but I > didn't find a better alternative (or maybe I have missed something obvious?) > > I think with the current POSIX definition of the interface, we have only > two options: either strdup() or cas

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Xin Li
On 08/10/15 14:42, Ed Schouten wrote: > Hi Xin, > > Something I forgot to mention in my previous email: > > 2015-08-10 23:31 GMT+02:00 Xin LI : >> + argp[0] = strdup(RCSDIFF); >> + argp[1] = strdup(filename); > >> +

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Xin Li
On 08/10/15 14:40, Ed Schouten wrote: > Hi Xin, > > 2015-08-10 23:31 GMT+02:00 Xin LI : >> + argp[0] = strdup(RCSDIFF); >> + argp[1] = strdup(filename); >> ... >> + free(argp[1]); >> +

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Ed Schouten
Hi Xin, Something I forgot to mention in my previous email: 2015-08-10 23:31 GMT+02:00 Xin LI : > + argp[0] = strdup(RCSDIFF); > + argp[1] = strdup(filename); > + argp[0] = strdup(CHECKOUT); > +

Re: svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Ed Schouten
Hi Xin, 2015-08-10 23:31 GMT+02:00 Xin LI : > + argp[0] = strdup(RCSDIFF); > + argp[1] = strdup(filename); > ... > + free(argp[1]); > + free(argp[0]); > +

svn commit: r286601 - head/usr.bin/patch

2015-08-10 Thread Xin LI
Author: delphij Date: Mon Aug 10 21:31:50 2015 New Revision: 286601 URL: https://svnweb.freebsd.org/changeset/base/286601 Log: use posix_spawn(3) instead of fork() and exec() manually as suggested by jmg@. Reviewed By: pfg MFC after:2 weeks Differential Revision: https://reviews.