From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 19-MAY-1989 18:24
To:	MRGATE::"ARISIA::EVERHART"
Subj:	re: DECw Loginout

Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Fri, 19 MAY 89 14:21:41 PDT
Received: from usc.edu by KL.SRI.COM with TCP; Fri, 19 May 89 14:09:51 PDT
Received: from gamera.usc.edu by usc.edu (5.59/SMI-3.0DEV3) id AA22372; 
                Fri, 19 May 89 14:09:16 PDT
Message-Id: <8905192109.AA22372@usc.edu>
Date: Fri, 19 May 89 14:08 PDT
From: CHRIS%SHARRA%gamera.usc.edu@usc.edu
Subject: re: DECw Loginout
To: Info-VAX%KL.SRI.COM@usc.edu
X-Vms-To: GAMERA::IN%"Info-VAX@KL.SRI.COM"

Larry.J.Granroth@IOWASP.PHYSICS.UIOWA.EDU asks
> Has anyone out there implemented a DECwindows utility that will
> run LOGINOUT so that different accounts can, for example, use
> DECterms at the same time?

Here's a simple utility I cooked up to do just that.  Link with:
	$link/notrace decterm, SYS$INPUT:/option
		sys$share:VAXCRTL /share
		sys$share:DECW$terminalshr /share

Chris Ho, USC-UCS

# include <descrip.h>
# include <prcdef.h>

# define GOOD(s)	((s) & 1)
# define BAD(s)		(! GOOD(s))

const static $DESCRIPTOR (DCL, "SYS$System:LogInOut.Exe");

main (int argc, char *argv[])
{
    char name[80];
    $DESCRIPTOR (name_dsc, name);
    register s;

    s = DECw$Term_Port (0, 0, 0, &name_dsc, &name_dsc.dsc$w_length);
    if BAD (s) return s;

    return SYS$CREPRC (0, &DCL, &name_dsc, &name_dsc, 0, 0, 0, 0, 4, 0, 0,
		       PRC$M_INTER | PRC$M_DETACH);
}

