Opened 5 years ago

Closed 22 months ago

#3966 closed enhancement (worksforme)

Batch job examples: add GRASS_PAGER=cat to avoid getting stuck expecting a terminal

Reported by: jidanni Owned by: grass-dev@…
Priority: trivial Milestone: 7.8.3
Component: Docs Version: unspecified
Keywords: exec batch grass.py Cc:
CPU: Unspecified Platform: Unspecified

Description

On https://grass.osgeo.org/grass79/manuals/grass7.html be sure to add an

GRASS_PAGER=cat grass --exec g.list type=all

example, else some batch job will be ruined due to /usr/bin/pager's

WARNING: terminal is not fully functional
-  (press RETURN)

As some commands, e.g., g.list, are thus booby-trapped, while others, e.g., v.info map=abc, will not trigger the "bug".

Change History (7)

comment:1 by jidanni, 5 years ago

< else some batch job will be ruined 
> else some batch jobs will be ruined

comment:2 by wenzeslaus, 5 years ago

Any idea how to reproduce this with interactive job for testing purposes?

comment:3 by wenzeslaus, 5 years ago

Keywords: exec batch grass.py added

comment:4 by jidanni, 5 years ago

Gee I only use GRASS from makefiles... not the GUI, so do not know.

comment:5 by neteler, 5 years ago

Milestone: 7.8.3

comment:6 by wenzeslaus, 22 months ago

I would even say a change in the source code is more appropriate if we understand the issue more, but I'm not able to reproduce this.

The following ones behave as expected:

grass --tmp-location XY --exec g.list type=all
nohup grass --tmp-location XY --exec g.list type=all
true | (setsid grass --tmp-location XY --exec g.list type=all) 2>&1 | cat
echo "grass --tmp-location XY --exec g.list type=all" > /tmp/test.sh
nohup bash /tmp/test.sh

Only bash /tmp/test.sh will jump into an interactive pager which may be little unexpected, but I'm in an interactive terminal, so perhaps inconvenient, but not unexpected.

I'm closing this and we can discuss this in a new issue on GitHub if needed.

comment:7 by wenzeslaus, 22 months ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.