Documentation of the module ux

by Peter Verhas

Table of Contents

[Contents]

1. Introduction

[Contents]

2. Unix specific functions

This module implements some UNIX system calls that are not implemented in the core of ScriptBasic but can be helpful for those who want to write system maintenance scripts using ScriptBasic.

The reason that these functions are not implemented inside ScriptBasic is that ScriptBasic itself is portable, and whenever a programmer writes a program in pure ScriptBasic it should execute the same way under UNIX as well as under Windows NT/Win98/W2K.

Programs using the module ux however are UNIX specific and will not run unaltered under Windows NT.

[Contents]

3. Fork the process

pid = ux::fork()
if pid then
  print "The sub process pid is ",pid
else
  print "Oh I am the child process"
end if

[Contents]

4. Change file access mode

ux::chmod("file_name",mode)

This function implements the chmod UNIX system call.