--- /dev/null
+function
+err mknod_char (pathname path, fileperm perm, int<??> major, int<??> minor)
+<<
+ return mknod (path, S_IFCHR | perm, makedev (major, minor));
+>>
+<:doc<
+
+
+
+>>
+
+;;
+
+(*
+mknod_block
+mkfifo
+mknod_socket
+*)
--- /dev/null
+object process
+ dir_list "/proc/[1-9]*"
+
+ constructor <<
+ $pid = atoi ($basename);
+ >>
+
+ property int pid (* implicit *)
+
+ property string short_command
+ <<
+ // some code to parse $filename/stat
+ >>
+ property char state
+ <<
+ // some code to parse $filename/stat
+ >>
+
+ writable property foo << ... >>
+
+ method err kill (signal sig)
+ <<
+ return kill ($pid, sig);
+ >>
+ method bool exists ()
+ <<
+ int r = kill ($pid, 0);
+ if (r == 0)
+ return 1;
+ if (r == -1 && errno == ESRCH)
+ return 0;
+ save_errno ();
+ return -1;
+ >>