IO (serial) sharing (Slack 10.2) - Slackware

This is a discussion on IO (serial) sharing (Slack 10.2) - Slackware ; I had minicom going from terminal1 , from 6 I started X and then kde wrote python script with PySerial, when I run it for the very first time I believe I was missing first 2 chars of incoming data ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: IO (serial) sharing (Slack 10.2)

  1. IO (serial) sharing (Slack 10.2)

    I had minicom going from terminal1 , from 6 I started X and then kde
    wrote python script with PySerial, when I run it for the very first time
    I believe I was missing first 2 chars of incoming data which I later found in minicom.

    I am puzzled why I was even able to get access ti serial port if minicom was already using it.

    Sam.

  2. Re: IO (serial) sharing (Slack 10.2)

    Sambo wrote:
    > I am puzzled why I was even able to get access ti serial port if minicom
    > was already using it.


    Functions such as flock (man flock for more info) provide mechanisms to
    avoid more than one process accessing the same file. However, they do not
    really provide a true lock functionality, rather than a lock on a door
    these functions are more like a "do not disturb" sign. If other processes
    don't care to hang up or read this sign it is to no use.

    So my guess is that either your python progrom or minicom is not doing any
    flock call on the serial device.

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc1(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


+ Reply to Thread