For those interested in a TH1 exec command, I took the ideas from Stephan
and Ron, and mixed a few of my own. Here I present my latest version for
the exec command I'm using. Now I directly call the functions already
included in src/popen.c

This time, it can take up to 3 parameters:
*exec ?NOWAIT? ?stdin? cmd*

*stdin:* will be sent to the child process (and then the pipe will be
closed).

*NOWAIT: *will create the process and continue (I/O pipes are closed
immediately, but not until stdin is passed to the child).

*cmd:* well... you know what it means.


As usual, comments, ideas and criticism are welcomed!!!!!


http://abiliojr.homenet.org:20001/public/execcmd.diff

On Thu, Feb 5, 2015 at 12:11 PM, Ron W <ronw.m...@gmail.com> wrote:

> On Thu, Feb 5, 2015 at 11:09 AM, Abilio Marques <abili...@gmail.com>
> wrote:
>
>> Here the current code (missing the capture of the stdout). I send it as a
>> patch to the current trunk version (0d1d7f6481).
>>
>>
>> Ideas?
>>
>
> I suggest altering the parameter processing to be:
>
> if ( argc == 3 ){
> if (fossil_strcmp(argv[1], "NOWAIT") == 0){
> wait = 0; cmd = argv[2];
> } else {
> return /* insert value for "unknown option" */;
> } } else { cmd = argv[1]; }
>
>
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to