NAME
sys.ops - System Interaction Opcodes
DESCRIPTION
Operations that allow the user to interact with the system.
When making changes to any ops file,
run make bootstrap-ops
to regenerate all generated ops files.
- spawnw(out INT, in STR) Spawn a subprocess whose program name and arguments are contained in the string $2 and wait for it to finish. The return status, which is very system-dependent, goes in $1.
- spawnw(out INT, invar PMC) Spawn a subprocess whose program name and arguments are contained in the array $2 and wait for it to finish. The return status, which is very system-dependent, goes in $1.TT #847:
- err(out INT) Store the system error code in $1.
- err(out STR) Store the system error message in $1.
- err(out STR, in INT) Get the system error message for the system error code $2 and store it in $1.
- time(out INT) Puts the current system time (represented as a whole number of seconds) in $1.
- time(out NUM) Puts the current system time (represented as a number of seconds, with microseconds) in $1.
- sleep(in INT)
- sleep(in NUM) Sleep for $1 seconds.
spawnw()
should itself handle splitting up command-line arguments,
rather than depending on the shell to do so in potentially unsafe manner.
See https://trac.parrot.org/parrot/ticket/847.TT #848: spawnw()
should return something less system-dependent,
and more object-like.
See https://trac.parrot.org/parrot/ticket/848.
COPYRIGHT
Copyright (C) 2001-2009, Parrot Foundation.
LICENSE
This program is free software. It is subject to the same license as the Parrot interp itself.