Get system command output: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
m (→{{header|J}}) |
||
Line 883: | Line 883: | ||
└─────────────────────┘</lang> |
└─────────────────────┘</lang> |
||
Caution: I have sometimes seen some versions of linux refuse to execute subshells after a few hundred thousand shell commands (the exec system call fails). I've not found any satisfying documentation on why this happens, but I strongly suspect kernel memory fragmentation (the examples where this happened were also using a lot of memory to accumulate results and it happened much more frequently on machines with little memory than on machines with more memory). Exiting J and starting a new process has cleared it up when it has happened. |
Caution: I have sometimes seen some versions of linux refuse to execute subshells after a few hundred thousand shell commands (the exec system call fails). I've not found any satisfying documentation on why this happens, but I strongly suspect kernel memory fragmentation (the examples where this happened were also using a lot of memory to accumulate results and it happened much more frequently on machines with little memory than on machines with more memory). Exiting J and starting a new process has cleared it up when it has happened. When that becomes an issue, I usually prefer to do subshell result capture before J starts, just to be safe. |
||
(I've seen other problems on windows and osx - I am only singling out linux here because it is the most convenient for command line and system command use.) |
(I've seen other problems on windows and osx - I am only singling out linux here because it is the most convenient for command line and system command use.) |