[GRASS5] Re: [GRASSLIST:787] bash scripts don't wait for grass
michael.barton at asu.edu
Thu Apr 27 23:33:49 EDT 2006
Thanks Radim. Hopefully this will mean that I can get rid of some wait
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
> From: Radim Blazek <radim.blazek at gmail.com>
> Date: Thu, 27 Apr 2006 16:53:53 +0200
> To: Luigi Ponti <lponti at infinito.it>
> Cc: <GRASSLIST at baylor.edu>, "grass5 at grass.itc.it" <grass5 at grass.itc.it>
> Subject: [GRASS5] Re: [GRASSLIST:787] bash scripts don't wait for grass
> It seems that execlp() and _spawnlp ( _P_OVERLAY,..) realy does not
> wait for the end of the new process (the current process is not replaced?)
> _spawnlp ( _P_WAIT, ...) seems to work , I have put iit into CVS,
> please test with the next build.
> On 4/21/06, Radim Blazek <radim.blazek at gmail.com> wrote:
>> The same problem appears on native port. It seems to be caused
>> by execl() which creates a new process instead of replacing the
>> current process.
>> #define P_WAIT 1
>> #define P_NOWAIT 2 /* always generates error */
>> #define P_OVERLAY 3
>> int execl(const char *path, const char *argv0, ...)
>> return spawnve(P_OVERLAY, path, &argv0, environ);
>> I think that spawnve with P_WAIT should help, I'll try it with the native
>> On 4/21/06, Luigi Ponti <lponti at infinito.it> wrote:
>>> Maybe unrelated but I remember a similar question on the list.
>>> When I run a ~400 lines bash script to batch process more than just a
>>> couple of files, the script kind of of gets tangled and stops before
>>> processing the last file (it is basically v.in.ascii importing plus
>>> v.rast.idw interpolating, and some Perl scripts), as if some overlapping
>>> between child processes occurred.
>>> I tried with the "wait" bash command which should have fixed it, but it
>>> still occurs. Is it a known issue? Or is it related to the fact that I
>>> am running grass60 on cygwin?
>>> Any hints to make grass batch processing more reliable will be appreciated.
More information about the grass-dev