Version 3 of Tcl vs POSIX - what functionality is missing

Updated 2004-12-07 16:30:00

Purpose: discuss what POSIX functionality is missing from Tcl.

Tcl is often promoted as a cross-operating system programming language. POSIX is the Portable Operating System Interface (what's the X?).

The POSIX functions are supported, to various degrees, across many different platforms. How does Tcl's default functionality map to the POSIX description of a portable Operating System?

In theory, one should be able to get to most aspects of POSIX from the Tcl language without resorting to writing one's own extension. At worst case, there should be easy access to one or more extensions that provide access to all of the POSIX standard functionality.


POSIX defines things such as:

  1. Time/Date functions
  2. File related functions
  3. Network functions
  4. Operating System functions

Some missing things:

  • umask(), uid/gid management
  • signals, wait()/waitpid()
  • threads (What Tcl calls threads is more like POSIX processes. Threads would share the same interpreter state.)
  • fork() (The ability to duplicate an interpreter's state.)
  • ftruncate()
  • file locking
  • mkstemp()
  • shared memory, "mmap"-ped files, semaphores, and other IPC mechanisms
  • nice()

Category Discussion