.
D 2000-10-26T00:54:12
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2331\sBug\nVersion:\s8.1\nSubmitDate:\s'1999-07-06'\nLastModified:\s'1999-12-03'\nSeverity:\sMED\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sSolaris\nOSVersion:\sSunOS\siplannet\s5.5.1\sGeneric_103640-12\ssun4u\ssparc\sSUNW,Ultra-2\nMachine:\sOther\nFixedDate:\s'2000-10-25'\nClosedDate:\s'1999-12-03'\n\n\nName:\nAlberto\sFranco\sde\sSa\sRibeiro\n\nExtensions:\nscotty\n\nCustomShell:\ntcl\score\sconfigured\swith\s--prefix=/opt/SCRtcl\n\nReproducibleScript:\nWhen\sI\sstart\sa\sdaemon\s(PostgreSQL)\son\sa\sscript\sfile,\sit\snever\sfinish.\sThe\nsame\sexec\sworks\swhen\sI\stry\sto\suse\sin\sa\sinteractive\sshell.\nMy\sscript:\n\n#!/opt/SCRtcl/bin/tclsh\n\nset\senv(PGLIB)\s/opt/PostgreSQL/lib\nset\senv(PGDATA)\s/opt/PostgreSQL/data\n\nswitch\s-exact\s[lindex\s$argv\s0]\s{\n\s\s\sstart\s{\n\s\s\s\s\s\s\sif\s{!\s[catch\s{\sexec\ssu\spgsql\s-c\s\s"/opt/PostgreSQL/bin/postmaster\s-b\s/opt/PostgreSQL/bin/postgres\s-D\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s/opt/PostgreSQL/data\s-S\s-o\s-e"\s}]}\s{\n\s\s\s\s\s\s\s\s\s\s\sputs\s"PostgreSQL\siniciado\scorretamente"\n\s\s\s\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\s\s\s\sputs\s"Falha\sna\sinicializacao\sdo\sPostgreSQL"\n\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s#\sBug\sdo\stcl:\sprocessos\sem\sbackground\simpedem\sshell\sde\sterminar\n\s\s\s\s\s\s\sexec\skill\s-HUP\s[pid]\n\s\s\s}\n\s\s\sstop\s\s{\n\s\s\s\s\s\s\sif\s[catch\s{set\sl1\s[split\s[exec\s/usr/ucb/ps\s-aux\s|\s/usr/bin/grep\s"^pgsql"]\s\\n]}]\s{\n\s\s\s\s\s\s\s\s\s\s\sputs\s"Nao\sfoi\sencontrado\snenhum\sprocesso\sdo\susuario\spgsql"\n\s\s\s\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\s\s\s\sforeach\sl\s$l1\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sset\spid\s[lindex\s[split\s$l]\s5]\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s{!\s[catch\s{exec\skill\s-INT\s$pid}]}\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sputs\s"Enviado\ssinal\sINT\sao\spid\s$pid"\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s}\n\s\s\s}\n\s\s\sdefault\s{\n\s\s\s\s\s\s\sputs\s"utilize:\s$argv0\s(start|stop)"\n\s\s\s}\n}\n#\send\sof\sscript\n\nPS:\stkined\sis\salso\snot\sfinishing.\n\nDesiredBehavior:\nscripts\sfinishing\swhen\sthere\sare\sno\smore\scommands\n\n\n\nThe\suser\sshould\sverify\sthat\sthe\ssame\scommands\sare\sreally\sbeing\ncalled.\s\sIn\san\sinteractive\sshell,\sthe\s'unknown'\scommand\swill\skick\nin\swhen\ssomething\sis\snot\srecognized.\s\sThe\sbehavior\sis\sdifferent\nin\sa\sstandard\sscript.\s\n--\s12/03/1999\shobbs
J foundin obsolete:\s8.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 60.\sNRE\sand\scoroutines
J title bug\son\sexec\scommand
J type Bug
K 218180ffffffffffffffffffffffffffffffffff
U nobody
Z a7631ff2b14b74ce42c8c997ef9625d2