From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 14-APR-1994 10:28:53.42
To:	EVERHART
CC:	
Subj:	Re: ForceEx (was Re: Logging out process...)

X-Newsgroups: comp.os.vms
From: jrcrum@bb1t.monsanto.com
Subject: Re: ForceEx (was Re: Logging out process...)
Message-Id: <1994Apr13.113624.1@bb1t.monsanto.com>
Followup-To: comp.os.vms
Lines: 38
Sender: news@tin.monsanto.com (USENET News System)
Organization: Monsanto Company, St. Louis, MO
Date: Wed, 13 Apr 1994 17:36:24 GMT
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET

In article <stafford-110494191540@slips3.winona.msus.edu>, stafford@ultra1.winona.msus.edu (John Stafford) writes:
> 
>    I understand, perhaps mistakenly, that it is better to force an exit
>    to a process rather than to kill it.  We have a job killer written
>    in DCL, but it does a STOP PROCESS.
> 
>    Would anyone have a tiny C program that would force a graceful exit
>    to a process when passed the PID as an argument? (Yep, not afraid
>    to admit that I am not a systems programmer)
> 
> -- 
> john stafford   winona state university - academic computing

And I'm not a C programmer.  How about Fortran?

        INTEGER*4 PID
        CHARACTER*8 ASCII_PID

        CALL LIB$GET_FOREIGN(ASCII_PID,)        !Get command line if any.

        IF(ASCII_PID(1:1) .NE. ' ')THEN
          READ(UNIT=ASCII_PID,FMT='(Z8)')PID
        ELSE
          WRITE(6,10)
10        FORMAT(' ENTER PID:',$)
          READ(5,20)PID
20        FORMAT(Z8)
        END IF

        STATUS=SYS$FORCEX(PID,,)
        IF(0 .NE. STATUS)CALL LIB$SIGNAL(%VAL(STATUS))
        END

-- 
------------------------------------------------------------------------------
|  Joe Crum, Monsanto | 577-6476@mcimail.com or jrcrum@sulfur.monsanto.com   |
| "Everybody's entitled to their own lousy, stinkin' opinion, no matter how  |
|  lousy or stinkin' it might be." - J. Conder                               |

