Thread: [tcljava-dev] missing exec functionality
Brought to you by:
mdejong
From: Shawn B. <sh...@qc...> - 2002-01-08 16:24:08
|
The current exec command does not support the file redirections such as <, >, <<, >>, etc. I added support for '&' already. I'll work on adding some of these next. Here's the full set of stuff that should be supported for exec: Arguments: * -keepnewline Do not discard trailing newline from the result (must be first argument) * | Pipes stdout from one process to another * |& Pipes both stdout & stderr output * < fileName Takes input from named file * <@ fileId Takes input from the I/O channel identified by fileId * << value Takes input from the given value * > fileName Overwrites fileName with stdout * 2> fileName Overwrites fileName with stderr output * >& fileName Overwrites fileName with both stdout & stderr output * >> fileName Appends stdout to the named file * 2>> fileName Appends stderr to the named file * >>& fileName Appends both stdout & stderr to the named file * >@ fileId Directs stdout to the I/O channel identified by fileId * 2>& fileId Directs stderr to the I/O channel identified by fileId * >&@ fileId Directs both stdout & stderr to the I/O channel identified by fileId * & Indicates pipeline should be run in background (last argument) -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-15 22:53:28
|
On Tue, 08 Jan 2002 11:24:05 -0500 Shawn Boyce <sh...@qc...> wrote: > The current exec command does not support the file redirections > such as <, >, <<, >>, etc. I added support for '&' already. I'll > work on adding some of these next. That would be great. This same functionality is needed in the open (pipe) command as well. This functionality is a bit tricky because it depends on the IO subsystem which is currently in flux. Just be aware that you may need to tweak you code a number of time before you are done. P.S. I just checked in the first part of your reflection based exec patch. cheers Mo |
From: Shawn B. <sh...@qc...> - 2002-01-15 23:16:44
|
Mo DeJong wrote: >On Tue, 08 Jan 2002 11:24:05 -0500 >Shawn Boyce <sh...@qc...> wrote: > >>The current exec command does not support the file redirections >>such as <, >, <<, >>, etc. I added support for '&' already. I'll >>work on adding some of these next. >> > >That would be great. This same functionality is needed in the open (pipe) >command as well. This functionality is a bit tricky because it depends > I was just realizing the open command had pipe also. > >on the IO subsystem which is currently in flux. Just be aware that >you may need to tweak you code a number of time before you are >done. > >P.S. >I just checked in the first part of your reflection based exec patch. > Was the patch file ok? First time I ever did it. > > >cheers >Mo > >_______________________________________________ >tcljava-dev mailing list >tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tcljava-dev > > -- -Shawn |
From: Shawn B. <sh...@qc...> - 2002-01-15 23:20:23
|
Shawn Boyce wrote: > > > Mo DeJong wrote: > >> On Tue, 08 Jan 2002 11:24:05 -0500 >> Shawn Boyce <sh...@qc...> wrote: >> >>> The current exec command does not support the file redirections >>> such as <, >, <<, >>, etc. I added support for '&' already. I'll >>> work on adding some of these next. >>> >> >> That would be great. This same functionality is needed in the open >> (pipe) >> command as well. This functionality is a bit tricky because it depends >> > I was just realizing the open command had pipe also. > >> >> on the IO subsystem which is currently in flux. Just be aware that >> you may need to tweak you code a number of time before you are >> done. >> >> P.S. >> I just checked in the first part of your reflection based exec patch. >> > Was the patch file ok? First time I ever did it. Just saw your SourceForge comment. Do you really mean the background patch or the theads-based code? In the future, I'll try to break up my changes into smaller chunks ;) > >> >> >> cheers >> Mo >> >> _______________________________________________ >> tcljava-dev mailing list >> tcl...@li... >> https://lists.sourceforge.net/lists/listinfo/tcljava-dev >> >> > -- -Shawn |
From: Mo D. <su...@ba...> - 2002-01-15 23:46:03
|
On Tue, 15 Jan 2002 18:20:20 -0500 Shawn Boyce <sh...@qc...> wrote: > >> P.S. > >> I just checked in the first part of your reflection based exec patch. > >> > > Was the patch file ok? First time I ever did it. > > Just saw your SourceForge comment. Do you really mean the background > patch or the theads-based code? In the future, I'll try to break up my > changes into smaller chunks ;) I think it makes sense to keep the bg and thread reading code together. The reflection API call and the thread code were the two that I thought did not mix. The reason this matters is because it really helps 1 year down the road when you are trying to look at the history of a given command. If patches for different things were all mixed together, it would be really hard to track down exactly how the code got from one point to another. cheers Mo |