Re: [cdesktopenv-devel] pclose() -> fclose()

2012-11-20 Thread Pascal Stumpf
On Mon, 19 Nov 2012 19:46:48 -0700 (MST), Jon Trulson wrote:
> On Mon, 19 Nov 2012, Pascal Stumpf wrote:
> 
> > See patch.
> >
> 
> This one I'm not so sure about... pclose might be doing other cleanups
> under the hood, so should be used...  Can you determine why the shell
> sometimes hangs?
> 
> If not, then can we make this conditional on OpenBSD only?

Disregard that patch; it was a problem with signal handling.  There's
already code there for OSF that makes it work on OpenBSD too.
>From d95b222678bd607b2fe4c66f9ef3cebc4945768d Mon Sep 17 00:00:00 2001
From: Pascal Stumpf 
Date: Tue, 20 Nov 2012 10:09:16 +0100
Subject: [PATCH] Use same SIGCHLD handling for OpenBSD as for OSF.

---
 cde/programs/dtfile/Main.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cde/programs/dtfile/Main.c b/cde/programs/dtfile/Main.c
index 0f077c4..be996ba 100644
--- a/cde/programs/dtfile/Main.c
+++ b/cde/programs/dtfile/Main.c
@@ -116,7 +116,7 @@
 #include 
 #include 
 
-#ifdef __osf__
+#if defined(__osf__) || defined(__OpenBSD__)
 #include 
 #endif /* __osf__ */
 
@@ -975,7 +975,7 @@ XtActionsRec actionTable[] = {
 
 extern XtInputId ProcessToolTalkInputId;
 
-#ifdef __osf__
+#if defined(__osf__) || defined(__OpenBSD__)
 extern void sigchld_handler(int);
 #endif /* __osf__ */
 
@@ -1019,7 +1019,7 @@ main(
Tt_pattern requests2Handle;
Tt_message msg;
Tt_status status;
-#ifdef __osf__
+#if defined(__osf__) || defined(__OpenBSD__)
struct sigaction sa, osa;
 #endif /* __osf__ */
int session_flag = 0;
@@ -1031,7 +1031,7 @@ main(
(void) signal (SIGINT, (void (*)())Stop);
 
/* We don't want any zombie children, do we? */
-#ifdef __osf__
+#if defined(__osf__) || defined(__OpenBSD__)
 sa.sa_handler = sigchld_handler;
 sigemptyset(&sa.sa_mask);
 sa.sa_flags   =  0;
@@ -6292,7 +6292,7 @@ FinalizeToolTalkSession();
 exit (1);
 }
 
-#ifdef __osf__
+#if defined(__osf__) || defined(__OpenBSD__)
 extern void
 sigchld_handler(int signo)  /* Do not use the arg signo at the moment */
 {
-- 
1.7.6

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


[cdesktopenv-devel] dtgreet: do not crash if LANG is not set

2012-11-20 Thread Pascal Stumpf
See patch.
>From 45619657fa4d16f365e62cd8e25435ae58c7a650 Mon Sep 17 00:00:00 2001
From: Pascal Stumpf 
Date: Tue, 20 Nov 2012 19:42:33 +0100
Subject: [PATCH] dtgreet: Do not crash if LANG is not set in the environment.

In that case, catopen() will have never been called, and we'd feed 0 as the
first argument to catgets().  This crashes, at least on OpenBSD.
---
 cde/programs/dtlogin/vgutil.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cde/programs/dtlogin/vgutil.c b/cde/programs/dtlogin/vgutil.c
index 1d7e73e..f38c777 100644
--- a/cde/programs/dtlogin/vgutil.c
+++ b/cde/programs/dtlogin/vgutil.c
@@ -791,7 +791,7 @@ unsigned char *
 ReadCatalog(int setn, int msgn, char *dflt)
 {
 OpenCatalog();
-if (0 > (int) nl_fd)
+if ((0 > (int) nl_fd) || (NULL == langenv))
   return (unsigned char*) dflt;
 else
   return (unsigned char*) catgets(nl_fd, setn, msgn, dflt);
-- 
1.7.6

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


[cdesktopenv-devel] dtlogin: Set NATIVEXBINDIR on OpenBSD

2012-11-20 Thread Pascal Stumpf
See patch.
>From 0b5f95e1faf6690e03490cf62d7433101518a08e Mon Sep 17 00:00:00 2001
From: Pascal Stumpf 
Date: Tue, 20 Nov 2012 20:08:34 +0100
Subject: [PATCH] Set NATIVEXBINDIR on OpenBSD.

---
 cde/programs/dtlogin/Imakefile |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cde/programs/dtlogin/Imakefile b/cde/programs/dtlogin/Imakefile
index 6bcab17..4ece5c7 100644
--- a/cde/programs/dtlogin/Imakefile
+++ b/cde/programs/dtlogin/Imakefile
@@ -196,6 +196,8 @@ INCLUDES = -I$(XPROJECTROOT)/include/freetype2
 
 #if defined (SunArchitecture)
   NATIVEXBINDIR = /usr/openwin/bin
+#elif defined(OpenBSDArchitecture)
+  NATIVEXBINDIR = /usr/X11R6/bin
 #else
   NATIVEXBINDIR = /usr/bin/X11
 #endif
-- 
1.7.6

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


[cdesktopenv-devel] BSD: Correct path to xterm

2012-11-20 Thread Pascal Stumpf
See patch.
>From a7618c2b2eb9b35d5b9ef0d9236fb6527f42490b Mon Sep 17 00:00:00 2001
From: Pascal Stumpf 
Date: Tue, 20 Nov 2012 22:03:30 +0100
Subject: [PATCH] Correct paths to xterm as failsafe client on the BSDs.

---
 cde/programs/dtlogin/session.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c
index 41cf26d..0a2cd86 100644
--- a/cde/programs/dtlogin/session.c
+++ b/cde/programs/dtlogin/session.c
@@ -1652,7 +1652,11 @@ StartClient( struct verify_info *verify, struct display 
*d, int *pidp )
 failsafeArgv[i++] = "/usr/X/bin/xterm";
 #elif defined(__hpux)
failsafeArgv[i++] = "/usr/bin/X11/hpterm";
-#elif defined(CSRG_BASED)
+#elif defined(__OpenBSD__)
+   failsafeArgv[i++] = "/usr/X11R6/bin/xterm";
+#elif defined(__NetBSD__)
+   failsafeArgv[i++] = "/usr/X11R7/bin/xterm";
+#elif defined(__FreeBSD__)
failsafeArgv[i++] = "/usr/local/bin/xterm";
 #else
failsafeArgv[i++] = "/usr/bin/X11/xterm";
-- 
1.7.6

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


[cdesktopenv-devel] dtlogin: Imakefile: Respect CDE_{INSTALL, CONFIGUR}ATION_TOP

2012-11-20 Thread Pascal Stumpf
Not sure about this one.  The comment says not to change the values
there, but there is no other way to change them.  FWIW, hardcoding
/etc/dt and /usr/dt is wrong.
>From 799c908071f5065e348c844db4b0404126c1fccb Mon Sep 17 00:00:00 2001
From: Pascal Stumpf 
Date: Tue, 20 Nov 2012 22:42:29 +0100
Subject: [PATCH] Respect CDE_CONFIGURATION_TOP and CDE_INSTALLATION_TOP.

Do not hardcode /etc/dt and /usr/dt.
---
 cde/programs/dtlogin/Imakefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cde/programs/dtlogin/Imakefile b/cde/programs/dtlogin/Imakefile
index 4ece5c7..33dc6f9 100644
--- a/cde/programs/dtlogin/Imakefile
+++ b/cde/programs/dtlogin/Imakefile
@@ -238,8 +238,8 @@ DEF_USER_PATH = 
DefaultUserPath:/usr/ccs/bin:$(NATIVEXBINDIR):$(XBINDIR)
 DEF_SYSTEM_PATH = DefaultSystemPath:$(NATIVEXBINDIR):$(XBINDIR)
 BOURNE_SHELL = DefaultSystemShell
 CPP_PROGRAM = CppCmd
-DEF_BM_PATH = 
/etc/dt/appconfig/icons/%L/%B%M.bm:/etc/dt/appconfig/icons/%L/%B%M.pm:/etc/dt/appconfig/icons/%L/%B:/etc/dt/appconfig/icons/C/%B%M.bm:/etc/dt/appconfig/icons/C/%B%M.pm:/etc/dt/appconfig/icons/C/%B:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B
-DEF_PM_PATH=/etc/dt/appconfig/icons/%L/%B%M.pm:/etc/dt/appconfig/icons/%L/%B%M.bm:/etc/dt/appconfig/icons/%L/%B:/etc/dt/appconfig/icons/C/%B%M.pm:/etc/dt/appconfig/icons/C/%B%M.bm:/etc/dt/appconfig/icons/C/%B:/usr/dt/appconfig/icons/%L/%B%M.pm:/usr/dt/appconfig/icons/%L/%B%M.bm:/usr/dt/appconfig/icons/%L/%B:/usr/dt/appconfig/icons/C/%B%M.pm:/usr/dt/appconfig/icons/C/%B%M.bm:/usr/dt/appconfig/icons/C/%B
+DEF_BM_PATH = 
$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
+DEF_PM_PATH=$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/%L/%B:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_CONFIGURATION_TOP)/appconfig/icons/C/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/%L/%B:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.pm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B%M.bm:$(CDE_INSTALLATION_TOP)/appconfig/icons/C/%B
 
 RES_DEFINES = '-DDEF_SERVER_LINE=":0 Local local $(DEF_SERVER) :0"' \
   '-DXRDB_PROGRAM="$(XBINDIR)/xrdb"' \
-- 
1.7.6

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] ToolTalk broken on OpenBSD

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> On Mon, 19 Nov 2012 19:37:53 -0700 (MST), Jon Trulson wrote:
>> On Sun, 18 Nov 2012, Pascal Stumpf wrote:
>>
>>> On Mon, 15 Oct 2012 18:10:26 -0600 (MDT), Jon Trulson wrote:
 On Mon, 15 Oct 2012, Pascal Stumpf wrote:

> Something has seriously broken ttsession on OpenBSD (and anything using
> it).  Either segfaulting and leaving zombie processes or immediately
> locking up on startup.  I probably won't have time to look into it until
> next weekend, but if anyone has an idea or wants to help debugging ...
>

 There have been a few changes there - cd into lib/tt and do a:

 git log -p .

 To see relevant commits.  Not sure what specifically might have been
 broken on CDE for OpenBSD...
>>>
>>> I *think* this was it.
>>>
>>
>> I'm not sure what you mean here... If you are saying that
>> OPT_UNIX_SOCKET_RPC needs to be enabled for OpenBSD, then this should
>> be done in tt/lib/tt_options.h (define it for OpenBSD)...
>>
>> Or am I missing something?
>
> No, I'm saying the svcfd_create() is still needed in the
> !OPT_UNIX_SOCKET_RPC case.  I don't really understand how this works on
> other OSes, but well ...

Hmm... it should be all or nothing WRT OPT_UNIX_SOCKET_RPC... Could it
have been this commit: 406fa95994e68bf8bf3004930d0498ce892412a3 ?

Have you bisected?


-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] pclose() -> fclose()

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> On Mon, 19 Nov 2012 19:46:48 -0700 (MST), Jon Trulson wrote:
>> On Mon, 19 Nov 2012, Pascal Stumpf wrote:
>>
>>> See patch.
>>>
>>
>> This one I'm not so sure about... pclose might be doing other cleanups
>> under the hood, so should be used...  Can you determine why the shell
>> sometimes hangs?
>>
>> If not, then can we make this conditional on OpenBSD only?
>
> Disregard that patch; it was a problem with signal handling.  There's
> already code there for OSF that makes it work on OpenBSD too.
>

Great, applied.

-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] dtgreet: do not crash if LANG is not set

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> See patch.
>
Applied.

-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] dtlogin: Set NATIVEXBINDIR on OpenBSD

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> See patch.
>
Applied.

-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] BSD: Correct path to xterm

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> See patch.
>
Applied.
-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] dtlogin: Imakefile: Respect CDE_{INSTALL, CONFIGUR}ATION_TOP

2012-11-20 Thread Jon Trulson
On Tue, 20 Nov 2012, Pascal Stumpf wrote:

> Not sure about this one.  The comment says not to change the values
> there, but there is no other way to change them.  FWIW, hardcoding
> /etc/dt and /usr/dt is wrong.
>

Part of the CDE 'standard' was that all of CDE would be installed in
/usr/dt/ and site-specific modifications would reside in /etc/dt/.
This way CDE could be updated without disturbing site-specific
configuration.

We definitely need to support this separation I believe, but most
distros these days don't really seem to approve of these specific
locations being a requirement.  I'm ok with that, but we should always
default to /usr/dt and /etc/dt, and make it easy for them to be
changed and honored throughout the tree if a given packager requires
it.  So...

Applied :)


-- 
Jon Trulson

"Oh the land of the free, and the home of the brave.
  Are you heaven on Earth, or the gloom of the grave."
 -- Iron Sky



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel