cdesktopenv/cde/programs/dtsession
Marcin Cieslak 17a33f0430 Use KORNSHELL variable instead of /bin/ksh
This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93

Also "ksh93" is accepted whenever "ksh" is.

Tested using the following /bin/ksh:

----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)

Scripts from Makefiles should now be executed either
with

$(KORNSHELL) korn-shell-script

or

$(SHELL) bourne-shell-script

therefore #!/bin/ksh has not been changed everywhere.

/usr/dt/bin/ scripts have been converted (e.g. Xsession)

Whenever possible Imake and CPP facilities have been used.

For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.

Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add

CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"

or similar (for example, see programs/dtprintinfo)

But for simple shell script substitution we usually change

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)

to:

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
                     -DKORNSHELL=$(KORNSHELL) \
                     -DXPROJECTROOT=X11ProjectRoot

since we don't want quotes for shell scripts.
2012-08-23 20:00:43 -06:00
..
Dtsession.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
Imakefile Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
OWsync.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
OWsync.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Sm.h dtsession: don't exit while processing your own session exit event. 2012-07-12 13:09:22 -06:00
SmAuth.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmAuth.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmCommun.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmCommun.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmConMgmt.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmConMgmt.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmDB.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmDB.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmError.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmError.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmGlobals.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmGlobals.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmHelp.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmHelp.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmHftRing.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmHftRing.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmLock.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmLock.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmMain.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmMigResources.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmMigResources.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmProp.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmProp.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmProperty.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmProperty.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmProtocol.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmProtocol.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmResource.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmRestore.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmRestore.h Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmSave.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmSave.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmScreen.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmScreen.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmStrDefs.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmUI.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmUI.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmWatch.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmWatch.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmWindow.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SmWindow.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmXSMP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmXSMP.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmXdef.c dtsession: fix VU#497553 2012-05-26 19:29:50 -06:00
SmXdef.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmXrm.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SmXrm.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Srv.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SrvFile_io.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SrvFile_io.h Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SrvMain.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SrvPalette.c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
SrvPalette.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
convertVS.sh Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtloadresources.src Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtsession.man Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtsession.msg.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
nlsMsgChk.txt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
nlsREADME.txt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
sys.font.iso Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
sys.font.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
sys.resources.src sys.resources.src: make HIGH_COLOR the default 2012-07-24 17:51:29 -06:00
sys.session.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
version.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00