From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Sun, 12 Jan 2003 04:48:15 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 11 ************************************************** Saturday 11 January 2003 Number 11 ************************************************** Subjects for today 1 Re: UnixOS2 "enhancements" : Thomas Dickey 2 Re: Python - import: not found : Ted Sikora 3 Re: UnixOS2 "enhancements" : DWParsons at t-online.de (Dave Parsons) 4 Re: Python - import: not found : Ted Sikora 5 Re: Bugtracking (was: UnixOS2 "enhancements") : Dave Saville" 6 Re: Python - import: not found : Ted Sikora 7 detach : Dave Saville" 8 Python - import: not found : John Poltorak 9 Re: detach : Holger Veit 10 Re: Python - import: not found : John Poltorak 11 Re: Python - import: not found : John Poltorak 12 Re: PASSWD handling : nickk" 13 Re: detach : Thomas Dickey 14 Re: ANN: Pine 4.52 : John Poltorak 15 Re: PASSWD handling : Nicholas Sheppard 16 ANN: Pine 4.52 : Nicholas Sheppard 17 Re: detach : Stefan Neis **= Email 1 ==========================** Date: Sun, 12 Jan 2003 06:28:12 -0500 From: Thomas Dickey Subject: Re: UnixOS2 "enhancements" On Sun, Jan 12, 2003 at 10:42:55AM +0100, Dave Parsons wrote: > On Sat, 11 Jan 2003 15:42:46 +0000, John Poltorak wrote: > > > On Sat, Jan 11, 2003 at 03:46:56PM +0100, Dave Parsons wrote: > > > > > > As, I think others have implied, the latest version is not > > > always the one you need. > > > > Well there is no need for UnixOS/2 to include the latest version of an app > > if it does not work. That fact that a particular version is included > > should indicate that it is, to some extent, 'approved'. > > > > The problem is not that a particular version of a tool does > not work per se, it is often one of backward compatibility > and conformity within a project. > Large, long running, cross platform projects with many > contributors choose a toolset and stay with it for a long > time. > As an example, the GCC project still uses autoconf 2.13, > although there was a discussion on the gcc list recently > about how and when to switch to version 2.5x, where x is > not yet defined. The whole set of autoconf 2.5x is a progression of incompatible versions. Anyone who writes a sufficiently complicated configure script will run into problems with it. > The best option in their opinion was:- > > 1. Make all directories have configure.in scripts which work > > correctly with *both* 2.13 and 2.5x, then switch over. It would be nice if it worked, but I've noted that some essential features of 2.13/2.52 are on the wish-list by the autoconf maintainers to render those obsolete. A number of years ago, the perl maintainers considered making their configure scripts rely upon perl. The consensus finally was that it would be too stupid to contemplate. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 2 ==========================** Date: Sun, 12 Jan 2003 10:39:15 -0500 From: Ted Sikora Subject: Re: Python - import: not found Did you copy the emx_link.py and pyc files to your python distro? They have to be copied. Mailman relies on these exclusively to run on OS/2. I hope python's path is not a problem. Did zapper post return no mailist found? If it did python is ok. John Poltorak wrote: > I'm trying to run a Python script and it come up with the error msg:- > > > import: not found > > This sounds as though my environment is missing something, but how do I > tell what? > > I hope I am not required to install Python in its default location... > I have it in \usr\lib\python, and have copied python22.dll to the libpath, > python.exe to \usr\bin, and have a CMD file, python.cmd which consists > of:- > > > at echo off > SET PYTHONHOME=c:/usr/lib/Python > SET PYTHONPATH=%PYTHONHOME%/Lib;%PYTHONHOME%/Lib/plat-os2emx;%PYTHONHOME%/Lib/lib-dynload;%PYTHONHOME%/Lib/site-packages > > c:\usr\bin\python %1 %2 %3 %4 %5 %6 %7 %8 %9 > > > Should this be sufficient for python programs to find all the required > python modules? > -- -- Ted Sikora tsikora at ntplx.net **= Email 3 ==========================** Date: Sun, 12 Jan 2003 10:42:55 +0100 (CET) From: DWParsons at t-online.de (Dave Parsons) Subject: Re: UnixOS2 "enhancements" On Sat, 11 Jan 2003 15:42:46 +0000, John Poltorak wrote: > On Sat, Jan 11, 2003 at 03:46:56PM +0100, Dave Parsons wrote: > > > As, I think others have implied, the latest version is not > > always the one you need. > > Well there is no need for UnixOS/2 to include the latest version of an app > if it does not work. That fact that a particular version is included > should indicate that it is, to some extent, 'approved'. > The problem is not that a particular version of a tool does not work per se, it is often one of backward compatibility and conformity within a project. Large, long running, cross platform projects with many contributors choose a toolset and stay with it for a long time. As an example, the GCC project still uses autoconf 2.13, although there was a discussion on the gcc list recently about how and when to switch to version 2.5x, where x is not yet defined. The best option in their opinion was:- > 1. Make all directories have configure.in scripts which work > correctly with *both* 2.13 and 2.5x, then switch over. Dave **= Email 4 ==========================** Date: Sun, 12 Jan 2003 11:31:32 -0500 From: Ted Sikora Subject: Re: Python - import: not found Those mm_cfg.py lines should fix it. # Site-specific settings DEFAULT_HOST_NAME = 'powerusersbbs.net' # DEFAULT_URL must end in a slash! DEFAULT_URL = 'http://powerusersbbs.net/mailman/' PYTHON = '/apps/python222/python.exe' John Poltorak wrote: > On Sun, Jan 12, 2003 at 10:39:15AM -0500, Ted Sikora wrote: > >>Did you copy the emx_link.py and pyc files to your python distro? >>They have to be copied. Mailman relies on these exclusively to run on OS/2. > > > I have Python installed on two machines, and Mailman only on one although > accessible via a network drive. > > When I try creating a Mailman list it seems to work correctly when I'm > using a local version of Python with Mailman on the network. If I try it > on the system where both are installed locally, I get errors. > > It's probably a Python misconfiguration, but not immediately obvious to > me. > > Maybe I should come back to it later... > > >>-- >>-- >>Ted Sikora >>tsikora at ntplx.net > > > -- -- Ted Sikora tsikora at ntplx.net **= Email 5 ==========================** Date: Sun, 12 Jan 2003 11:45:42 +0000 (GMT) From: "Dave Saville" Subject: Re: Bugtracking (was: UnixOS2 "enhancements") On Sat, 11 Jan 2003 19:14:04 +0000, John Poltorak wrote: >On Sat, Jan 11, 2003 at 09:33:44AM -0600, Jeff Robinson wrote: > >> Part of the reason I bring up the issue of bugtracking is that some of >> the folks doing the Mozilla-port right now have some issues with some of >> the ported tools but don't know where to report any problems, especially >> as the authors of some tools are no longer available. > >When KUR departed from the OS/2 scene most of his ports were left >abandoned, although Jun Sawataishi and Andreas Buening seem to have taken >over a number of them subsequently. I suppose it's up to each individual >porter to decide if/how to track bugs. > >I'm not sure what we do about those ports which no one has taken over... Do we have a list of ports/versions and who maintains them or not as the case maybe? -- Regards Dave Saville **= Email 6 ==========================** Date: Sun, 12 Jan 2003 13:47:32 -0500 From: Ted Sikora Subject: Re: Python - import: not found I would add a fresh copy of Andrew's bin to /apps and set the env for it. Don't forget to copy emx_link.py to it and set the mm_cfg.py variables in MM with: DEFAULT_HOST_NAME = 'yourdomain.com' DEFAULT_URL = 'http://yourdomain.com/mailman/' before running it. You can delete everything in lists manually before you start again. John Poltorak wrote: > On Sun, Jan 12, 2003 at 11:31:32AM -0500, Ted Sikora wrote: > -- Ted Sikora tsikora at ntplx.net **= Email 7 ==========================** Date: Sun, 12 Jan 2003 14:16:12 +0000 (GMT) From: "Dave Saville" Subject: detach Anyone know what the detach command does? I have a problem program that works fine if you detach it - so I want to do it myself. In *nix one would: close(0) close(1) close(2) /* and possibly re-assign */ if ( fork != 0) { exit(0) } /* rest of code here */ But I still get a problem - what am I missing? -- Regards Dave Saville **= Email 8 ==========================** Date: Sun, 12 Jan 2003 15:06:59 +0000 From: John Poltorak Subject: Python - import: not found I'm trying to run a Python script and it come up with the error msg:- import: not found This sounds as though my environment is missing something, but how do I tell what? I hope I am not required to install Python in its default location... I have it in \usr\lib\python, and have copied python22.dll to the libpath, python.exe to \usr\bin, and have a CMD file, python.cmd which consists of:- at echo off SET PYTHONHOME=c:/usr/lib/Python SET PYTHONPATH=%PYTHONHOME%/Lib;%PYTHONHOME%/Lib/plat-os2emx;%PYTHONHOME%/Lib/lib-dynload;%PYTHONHOME%/Lib/site-packages c:\usr\bin\python %1 %2 %3 %4 %5 %6 %7 %8 %9 Should this be sufficient for python programs to find all the required python modules? -- John **= Email 9 ==========================** Date: Sun, 12 Jan 2003 15:59:59 +0100 From: Holger Veit Subject: Re: detach On Sun, Jan 12, 2003 at 02:16:12PM +0000, Dave Saville wrote: > Anyone know what the detach command does? I have a problem program > that works fine if you detach it - so I want to do it myself. > > In *nix one would: > > close(0) > close(1) > close(2) > > /* and possibly re-assign */ > > if ( fork != 0) > { > exit(0) > } > > /* rest of code here */ > > But I still get a problem - what am I missing? You obviously want a daemon process. Detach - I suppose you mean the CMD command - starts a new program with a "no_wait" option, so that the parent process does no longer feel responsible for its child. One part is that they do no longer share the common "controlling terminal", this is what you attempt by closing stdin, stdout, and stderr, and then start the child. In Unix, this is not enough, because there is still the bonding between parent and child, which is in Unix terminology called a session (the parent is the "session leader", i.e. responsible for all processes belonging to its session). As a recipe from Stevens "Unix network programming", the correct way to create a daemon is the following skeleton: (child process already spawned off from parent by above with fork()): in child process: ... pid_t pid; if ((pid=fork()) != 0) exit(0); /* parent terminates, first child continues */ setsid(); /* become session leader of a new session */ signal(SIGHUP,SIG_IGN); /* make resistent against hangup */ if ((pid=fork()) != 0) exit(0); /* first child terminates, second continues */ chdir("/"); /* optional: set a defined environment */ umask(0); /* optional: set a defined environment */ for (int i=0; i Subject: Re: Python - import: not found On Sun, Jan 12, 2003 at 10:39:15AM -0500, Ted Sikora wrote: > Did you copy the emx_link.py and pyc files to your python distro? > They have to be copied. Mailman relies on these exclusively to run on OS/2. I have Python installed on two machines, and Mailman only on one although accessible via a network drive. When I try creating a Mailman list it seems to work correctly when I'm using a local version of Python with Mailman on the network. If I try it on the system where both are installed locally, I get errors. It's probably a Python misconfiguration, but not immediately obvious to me. Maybe I should come back to it later... > -- > -- > Ted Sikora > tsikora at ntplx.net -- John **= Email 11 ==========================** Date: Sun, 12 Jan 2003 16:24:38 +0000 From: John Poltorak Subject: Re: Python - import: not found On Sun, Jan 12, 2003 at 11:31:32AM -0500, Ted Sikora wrote: > Those mm_cfg.py lines should fix it. > > # Site-specific settings > DEFAULT_HOST_NAME = 'powerusersbbs.net' > # DEFAULT_URL must end in a slash! > DEFAULT_URL = 'http://powerusersbbs.net/mailman/' > > PYTHON = '/apps/python222/python.exe' This would not account for it working on one system, but not on another. In fact, Mailman itself does not appear to be the problem, because the same installation is being shared by both systems. > John Poltorak wrote: > > On Sun, Jan 12, 2003 at 10:39:15AM -0500, Ted Sikora wrote: > > > >>Did you copy the emx_link.py and pyc files to your python distro? > >>They have to be copied. Mailman relies on these exclusively to run on OS/2. > > > > > > I have Python installed on two machines, and Mailman only on one although > > accessible via a network drive. > > > > When I try creating a Mailman list it seems to work correctly when I'm > > using a local version of Python with Mailman on the network. If I try it > > on the system where both are installed locally, I get errors. > > > > It's probably a Python misconfiguration, but not immediately obvious to > > me. > > > > Maybe I should come back to it later... > > -- > -- > Ted Sikora > tsikora at ntplx.net -- John **= Email 12 ==========================** Date: Sun, 12 Jan 2003 16:50:19 +0300 (MSK) From: "nickk" Subject: Re: PASSWD handling On Sun, 12 Jan 2003 20:24:49 +1100 (AED), Nicholas Sheppard wrote: >> I uploaded the preview of libpwd that uses both Security/2 is >> available and traditional passwd file otherwise. The library is not >> tested, just written and compiled. The url is >> ftp://ftp.os2ports.com/incoming/libpwd-0.0.0.zip. >> It will be great if someone could test it and fix bugs if any ;) > >`fncntl' on line 435 of pwd.c should be `fcntl'. Thanks, fixed ;) **= Email 13 ==========================** Date: Sun, 12 Jan 2003 16:52:13 -0500 From: Thomas Dickey Subject: Re: detach On Sun, Jan 12, 2003 at 10:06:38PM +0100, Stefan Neis wrote: > On Sun, 12 Jan 2003, Holger Veit wrote: > > > if ((pid=fork()) != 0) exit(0); /* parent terminates, first child continues */ > > setsid(); /* become session leader of a new session */ > > signal(SIGHUP,SIG_IGN); /* make resistent against hangup */ > > if ((pid=fork()) != 0) exit(0); /* first child terminates, second continues */ > > chdir("/"); /* optional: set a defined environment */ > > umask(0); /* optional: set a defined environment */ > > for (int i=0; i > close(i); /* close all handles */ > > > Anybody knows what benefit the second fork is supposed to give me? > So far, I just see it as creating an unwanted bond between the new > session leader and its child for no visible (to me) benefit? > That's a technique used to create an in-between process which waits for the exit status of the "real" child, allowing the parent to go off and not have to worry about waiting for it. On Unix, if you don't wait for the exit-status from a child process, the result is an orphaned process which uses up some resources. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net **= Email 14 ==========================** Date: Sun, 12 Jan 2003 18:01:53 +0000 From: John Poltorak Subject: Re: ANN: Pine 4.52 On Sun, Jan 12, 2003 at 08:57:03PM +1100, Nicholas Sheppard wrote: > John: This version is linked with syslog.lib from syslog3a.zip. I don't > use or know much about syslogd myself but it seemed to work okay with > syslogd.exe from the same package. I couldn't get IBM syslogd.exe to do > anything, however. Can you tell me how it goes for you? It's nice to see output to the SYSLOG console - especially for debugging, when you don't really have any clue if anything is set up or working correctly. Just for aesthetic reasons, and possibly for any analysis program which expects things in a standard format, it would be preferable to have the output slightly re-arranged. Here's the sort of output I got:- 2003-01-12 12.00.21 Jan 12 12:00:21 rsyncd[1569]: rsync: name lookup failed for 192.168.0.11: temporary failure in name resolution. 2003-01-12 12.00.21 Jan 12 12:00:21 rsyncd[1569]: rsync on baseline from UNKNOWN (192.168.0.11) 2003-01-12 12.00.31 Jan 12 12:00:31 rsyncd[1569]: rsync: error writing 4096 unbuffered bytes - exiting: Broken pipe 2003-01-12 12.00.31 Jan 12 12:00:31 rsyncd[1569]: rsync error: error in rsync protocol data stream (code 12) at io.c(463) 2003-01-12 16.59.55 Jan 12 16:59:55 named[35]: Cleaned cache of 132 RRsets 2003-01-12 16.59.55 Jan 12 16:59:55 named[35]: NSTATS 1042390795 1039190379 A=222435 PTR=40728 MX=153909 TXT=2 ANY=293578 2003-01-12 16.59.55 Jan 12 16:59:55 named[35]: XSTATS 1042390795 1039190379 RR=192719 RNXD=17214 RFwdR=100206 RDupR=322 RFail=1969 RFErr=0 RErr=7 RAXFR=0 RLame=1589 ROpts=0 SSysQ=99310 SAns=665821 SFwdQ=131782 SDupQ=293918 SErr=0 RQ=710652 RIQ=1 RFwdQ=131782 RDupQ=0 RTCP=23 SFwdR=100206 SFail=57709 SFErr=0 SNaAns=500965 SNXD=55508 RUQ=0 RURQ=0 RUXFR=0 RUUpd=0 2003-01-12 17.26.53 syslog: Auth user=john host=213-152-37-91.dsl.eclipse.net.uk [213.152.37.91] nmsgs=0/0 2003-01-12 17.26.53 syslog: Logout user=john host=213-152-37-91.dsl.eclipse.net.uk [213.152.37.91] nmsgs=0 ndele=0 2003-01-12 17.27.24 syslog: Auth user=john host=213-152-37-91.dsl.eclipse.net.uk [213.152.37.91] nmsgs=0/0 2003-01-12 17.27.24 syslog: Logout user=john host=213-152-37-91.dsl.eclipse.net.uk [213.152.37.91] nmsgs=0 ndele=0 I'm not sure if there are any conventions as far as syslog msgs go, although I know there is a logger.exe which can be used for formatting them. I wondered if there was anything like a debug flag which would generate a lot of msgs for syslog, such as number of emails transferred. I have it working with a Netscape OK, although I still need to integrate things with sendmail to test the whole process. Don't worry about IBM's syslog. I'm not sure that anyone uses it, and I'd prefer to use things we could change for ourselves. > Nicholas S. > > |\ Location: Wollongong, Australia | Men never do evil so completely and > |\ E-mail: nps at zeta.org.au | cheerfully as when they do it from > | WWW: http://www.zeta.org.au/~nps | religious conviction. > | ---> Cynicism & Negativity | > - Blaise Pascal -- John **= Email 15 ==========================** Date: Sun, 12 Jan 2003 20:24:49 +1100 (AED) From: Nicholas Sheppard Subject: Re: PASSWD handling On Thu, 9 Jan 2003, nickk wrote: > I uploaded the preview of libpwd that uses both Security/2 is > available and traditional passwd file otherwise. The library is not > tested, just written and compiled. The url is > ftp://ftp.os2ports.com/incoming/libpwd-0.0.0.zip. > It will be great if someone could test it and fix bugs if any ;) `fncntl' on line 435 of pwd.c should be `fcntl'. Once I fixed that, it linked and ran successfully with ipop3d. I don't have Security/2 but I have a passwd file generated by my own routines and it seemed to work okay for logging a few people in. Nicholas S. |\ Location: Wollongong, Australia | Men never do evil so completely and |\ E-mail: nps at zeta.org.au | cheerfully as when they do it from | WWW: http://www.zeta.org.au/~nps | religious conviction. | ---> Cynicism & Negativity | - Blaise Pascal **= Email 16 ==========================** Date: Sun, 12 Jan 2003 20:57:03 +1100 (AED) From: Nicholas Sheppard Subject: ANN: Pine 4.52 Hi all. Pine 4.52 is here. This is a bug-fix release from the University of Washington and there has been no OS/2-specific changes to the standard version, which you can find on Hobbes (pine452.zip). The new version (npine452.zip) has had some tweaks and is available from my web site at http://www.zeta.org.au/~nps/software/pine/en/index.html This version uses a new /etc/passwd emulator that I wrote before nickk released his version. It doesn't know about Security/2 but I've tested that it can interpret all formats of /etc/passwd that I know of. I've also tested that ipop3d compiles and runs successfully with nickk's version (see post under "PASSWD handling"). There are still some screen-handling problems in VIO windows. Everything seems okay in an xterm, though and if you use xterms I'm reasonably confident that this version is as good as the old one now. John: This version is linked with syslog.lib from syslog3a.zip. I don't use or know much about syslogd myself but it seemed to work okay with syslogd.exe from the same package. I couldn't get IBM syslogd.exe to do anything, however. Can you tell me how it goes for you? Nicholas S. |\ Location: Wollongong, Australia | Men never do evil so completely and |\ E-mail: nps at zeta.org.au | cheerfully as when they do it from | WWW: http://www.zeta.org.au/~nps | religious conviction. | ---> Cynicism & Negativity | - Blaise Pascal **= Email 17 ==========================** Date: Sun, 12 Jan 2003 22:06:38 +0100 (CET) From: Stefan Neis Subject: Re: detach On Sun, 12 Jan 2003, Holger Veit wrote: > if ((pid=fork()) != 0) exit(0); /* parent terminates, first child continues */ > setsid(); /* become session leader of a new session */ > signal(SIGHUP,SIG_IGN); /* make resistent against hangup */ > if ((pid=fork()) != 0) exit(0); /* first child terminates, second continues */ > chdir("/"); /* optional: set a defined environment */ > umask(0); /* optional: set a defined environment */ > for (int i=0; i close(i); /* close all handles */ Anybody knows what benefit the second fork is supposed to give me? So far, I just see it as creating an unwanted bond between the new session leader and its child for no visible (to me) benefit? Regards, Stefan -- Micro$oft is not an answer. It is a question. The answer is 'no'.