[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 21 14:41:20 1995 
Subject:Re: Pop and the Web 
From:Ian Rogers 
Volume-ID:951222.01 

Jocelyn Paine (popx@uk.ac.ox.vax) wrote:
> .... Unfortunately, the Poplog is 14.1, but I hope that's not
> too out of date.                  ^^^^
                                     ^^
> So can I ask what Unix facilities for signalling between processes are
> easily callable from Poplog?

Well v15.01 has a stonkingly good sockets package.

Alternatively you could use the SIG_USR1 trick that Anthony Worrall figured
out (see below)

Ian.

---- cut ---------- snip -------- tear ---------


> From syma!doc.ic.ac.uk!uknet!bhamcs!news Tue Feb  8 12:00:30 1994
> Path: syma!doc.ic.ac.uk!uknet!bhamcs!news
> From: Anthony.Worrall@uk.ac.reading ("Anthony.Worrall" (Anthony Worrall))
> Newsgroups: comp.lang.pop
> Subject: OpenWindows file manager
> Date: 7 Feb 1994 19:20:38 -0000
> Organization: cs.bham.ac.uk MAIL->NEWS gateway
> Lines: 53
> Sender: pp@cs.bham.ac.uk
> Message-ID: <2j64a6$epk@percy.cs.bham.ac.uk>
> NNTP-Posting-Host: percy.cs.bham.ac.uk
> X-Relay-Info: Relayed through cs.bham.ac.uk MAIL->NEWS gateway

Here is a script I just wrote to allows xved to be used from
the OpenWindows file manager. It would probably be better to get
Poplog to understand Drag n Drop and the ToolTalk process
but that would take me too long to work out.

Enjoy.


Anthony.Worrall@Reading.ac.uk


#!/bin/csh
# This script is used to edit file(s) selected from the OpenWindows
# filemgr using the POPLOG xved editor.
#
# If a pop11 process is running it is sent the signal USR1
# The pop11 handler for this signal should be set as follows
#
#    uses sigdefs
#    #_IF DEF SIG_USR1
#       erase<>compile(%'/tmp/pop11_client.'><poppid%)
#            -> sys_signal_handler(SIG_USR1);
#    #_ENDIF;
#
# This can be done in the file $poplib/initx.p
#
# The script should probably have some options to allow pop11
# procedures other than edit to be used.

set command = edit
set release = `/usr/bin/uname -r | cut -c1`

# Find a pop11 process running with arguments %x or +xved
if ( $release == 4) then
    set pid=`ps xw | egrep '[0-9] pop11' | egrep '[%+]x' | awk -e '{print $1}'`
else
    set user = `who am i | awk -e '{print $1}'`
    set pid=`ps -fu $user | egrep  '[0-9] pop11' | egrep '[%+]x' | awk -e '{print $2}'`
endif

if ($pid != "" ) then
    # If a pop11 prosess is found put and edit instruction in a file
    # and tell the pop11 process to compile it
    /bin/rm /tmp/pop11_client.$pid
    foreach file ($*)
        echo "$command('$*');" >> /tmp/pop11_client.$pid
    end
    kill -USR1 $pid
else
    # If no pop11 process found start a cmdtool (iconified) which
    # then runs xved on the file
    cmdtool -Wi pop11 +xved $*
endif