Jim Tcl
Check-in [6f79baf755]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:doc: Update remaining references to os.wait

Now simply 'wait'

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6f79baf75543136346d242bd7735aa1dc136f9b2
User & Date: steveb@workware.net.au 2017-10-21 02:49:10
Context
2017-10-21
02:49
aio: No need to create a new channel for ssl

Just "promote" the current channel to ssl

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 256d17bf10 user: steveb@workware.net.au tags: trunk

02:49
doc: Update remaining references to os.wait

Now simply 'wait'

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 6f79baf755 user: steveb@workware.net.au tags: trunk

02:37
file: __MSYS__ signifies windows too

Needed to make file join work with msys2

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 04d829652a user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to auto.def.

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
        exec      - Tcl-compatible exec command
        file      - Tcl-compatible file command
        glob      - Tcl-compatible glob command
        history   - Tcl access to interactive history
        readdir   - Required for glob
        package   - Package management with the package command
        load      - Load binary extensions at runtime with load or package
        posix     - Posix APIs including os.fork, os.wait, pid
        regexp    - Tcl-compatible regexp, regsub commands
        signal    - Signal handling
        stdlib    - Built-in commands including lassign, lambda, alias
        syslog    - System logging with syslog
        tclcompat - Tcl compatible read, gets, puts, parray, case, ...
        namespace - Tcl compatible namespace support








|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
        exec      - Tcl-compatible exec command
        file      - Tcl-compatible file command
        glob      - Tcl-compatible glob command
        history   - Tcl access to interactive history
        readdir   - Required for glob
        package   - Package management with the package command
        load      - Load binary extensions at runtime with load or package
        posix     - Posix APIs including os.fork, os.uptime
        regexp    - Tcl-compatible regexp, regsub commands
        signal    - Signal handling
        stdlib    - Built-in commands including lassign, lambda, alias
        syslog    - System logging with syslog
        tclcompat - Tcl compatible read, gets, puts, parray, case, ...
        namespace - Tcl compatible namespace support

Changes to examples/ssl.server.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Example of a ssl encrypted, tcp server which sends a response

# Listen on port 20000. No host specified means 0.0.0.0
set s [socket stream.server 20000]

$s readable {
	# Clean up children
	os.wait -nohang 0
	set sock [[$s accept addr] ssl -server certificate.pem key.pem]
	puts "Client address: $addr"

	# Make this server forking so we can accept multiple
	# simultaneous connections
	if {[os.fork] == 0} {
		$s close







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Example of a ssl encrypted, tcp server which sends a response

# Listen on port 20000. No host specified means 0.0.0.0
set s [socket stream.server 20000]

$s readable {
	# Clean up children
	wait -nohang 0
	set sock [[$s accept addr] ssl -server certificate.pem key.pem]
	puts "Client address: $addr"

	# Make this server forking so we can accept multiple
	# simultaneous connections
	if {[os.fork] == 0} {
		$s close

Changes to examples/tcp.server.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Example of a udp server which sends a response

# Listen on port 20000. No host specified means 0.0.0.0
set s [socket stream.server 20000]

$s readable {
	# Clean up children
	os.wait -nohang 0
	set sock [$s accept addr]
	puts "Client address: $addr"

	# Make this server forking so we can accept multiple
	# simultaneous connections
	if {[os.fork] == 0} {
		$s close







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Example of a udp server which sends a response

# Listen on port 20000. No host specified means 0.0.0.0
set s [socket stream.server 20000]

$s readable {
	# Clean up children
	wait -nohang 0
	set sock [$s accept addr]
	puts "Client address: $addr"

	# Make this server forking so we can accept multiple
	# simultaneous connections
	if {[os.fork] == 0} {
		$s close

Changes to jim-exec.c.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
struct WaitInfo
{
    pidtype pid;                /* Process id of child. */
    int status;                 /* Status returned when child exited or suspended. */
    int flags;                  /* Various flag bits;  see below for definitions. */
};

/* This table is shared by exec and os.wait */
struct WaitInfoTable {
    struct WaitInfo *info;      /* Table of outstanding processes */
    int size;                   /* Size of the allocated table */
    int used;                   /* Number of entries in use */
    int refcount;               /* Free the table once the refcount drops to 0 */
};








|







304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
struct WaitInfo
{
    pidtype pid;                /* Process id of child. */
    int status;                 /* Status returned when child exited or suspended. */
    int flags;                  /* Various flag bits;  see below for definitions. */
};

/* This table is shared by exec and wait */
struct WaitInfoTable {
    struct WaitInfo *info;      /* Table of outstanding processes */
    int size;                   /* Size of the allocated table */
    int used;                   /* Number of entries in use */
    int refcount;               /* Free the table once the refcount drops to 0 */
};

Changes to jim_tcl.txt.

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

1. Object-based I/O (aio), but with a Tcl-compatibility layer
2. I/O: Support for sockets and pipes including udp, unix domain sockets and IPv6
3. Integers are 64bit
4. Support for references (`ref`/`getref`/`setref`) and garbage collection
5. Builtin dictionary type (`dict`) with some limitations compared to Tcl 8.6
6. `env` command to access environment variables
7. Operating system features: `os.fork`, `os.wait`, `os.uptime`, `signal`, `alarm`, `sleep`
8. Much better error reporting. `info stacktrace` as a replacement for '$errorInfo', '$errorCode'
9. Support for "static" variables in procedures
10. Threads and coroutines are not supported
11. Command and variable traces are not supported
12. Built-in command line editing
13. Expression shorthand syntax: +$(...)+
14. Modular build allows many features to be omitted or built as dynamic, loadable modules







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

1. Object-based I/O (aio), but with a Tcl-compatibility layer
2. I/O: Support for sockets and pipes including udp, unix domain sockets and IPv6
3. Integers are 64bit
4. Support for references (`ref`/`getref`/`setref`) and garbage collection
5. Builtin dictionary type (`dict`) with some limitations compared to Tcl 8.6
6. `env` command to access environment variables
7. Operating system features: `os.fork`, `os.uptime`, `wait`, `signal`, `alarm`, `sleep`
8. Much better error reporting. `info stacktrace` as a replacement for '$errorInfo', '$errorCode'
9. Support for "static" variables in procedures
10. Threads and coroutines are not supported
11. Command and variable traces are not supported
12. Built-in command line editing
13. Expression shorthand syntax: +$(...)+
14. Modular build allows many features to be omitted or built as dynamic, loadable modules