Lock the file.
Or have the device driver enforce single access.

-- R;

On Wed, 12 Oct 2005, John Summerfied wrote:

> Rob van der Heij wrote:
> > On 10/11/05, Carsten Otte <[EMAIL PROTECTED]> wrote:
> >
> >
> >>I was just suggesting that this problem can easily be solved in scripts
> >>outside vmcp. I agree that my proposal may require the script author to
> >>think about his best way to retrieve that output - but because <me>
> >
> >
> > Would it be terribly ugly to have a command that outputs the CP return
> > code for the most recently issued vmcp command? The would avoid the
> Most recently issued by whom?
>
> Where would it be stored?
>
> > issues with one-byte return code and separate the Linux return code
> > from the CP response.
> >
> > #! /bin/sh
> > vmcp MSG ROB Testing
> > rc = `vmcprc`
> Nit: if this is a shell script, no spaces allowed.
> > if $rc = 54 ; then
> s/=/-eq/ for numbers
>
> >    echo User not logged on
> > fi
>
> I guess the only safe place to store the vmrc is in a guaranteed unique
> file. So both parties agree on its name, the name has to be provided by
> whatever calls vmcp.
>
> We're getting very close to my very crude hack which does in fact
> provide a guaranteed unique file.
>
> I'm not keen on my hack - it's bound to confuse lots of readers - but
> this is quite straightforward:
>       F=$(mktemp /tmp/${USER}-XXXXXX)
>       vmcp MSG ROB Testing 4>${F}
> and then the script reads and analyses ${F}, and then removes it.
>
>
>
>
> --
>
> Cheers
> John
>
> -- spambait
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
> Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
>
> do not reply off-list
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to