tcsetattr (on serial device) takes effect only at next application startup

linux

    Next

  • 1. Building enterprise websites with apache
    Hi, I am looking for a complete solution book that describes building websites using apache/linux applications. There are many asp.net books that cover building fully-featured dynamic websites. Is there any equivalent using Apache/Linux? For example, description of how to achieve custom authentication, secure communication, serving content based on users, templates, implementing sessions properly, security, encrypted query strings etc. etc. There are guides, documentation, and articles, but all are sparsely organised. Any well organised documentation? Many thanks, Bahadir
  • 2. C or C++ for FOSS/linux?
    C or C++, which is better to learn and improve upon for a goal of contributing to open source projects, writing linux drivers, helping with linux and FOSS in general? -- If you have walked all these days with closed ears and mind asleep, wake up now! -- Gandalf

tcsetattr (on serial device) takes effect only at next application startup

Postby Felix Brack » Fri, 25 Mar 2005 02:40:43 GMT

I use 'tcsetattr' to change the attributes of a serial interface like ttyS1.
According to my knowledge the new parameters I set should be in effect
as soon as a call like 'tcsetattr(nfed, TCSANOW, &tty_parms)' returns.

Fact is, they are not. The old parameters seem to remain active, even though
a call to 'tcgetattr' shows the new parameters.

After stopping and restarting my application the new paramters are effective
and the application is working fine.

Is there any other routine besides 'tcsetattr' (and 'tcflush') I must call
to activate
a new set of parameters?
Do I have to close and reopen the device after a call to 'tcsetattr'?

many thanks, Felix



Similar Threads:

1.Serial port: tcgetattr and tcsetattr

2.tcsetattr(fd, TCSAFLUSH) on an O_ASYNC pts device always fails

3.[News] Lists of Finance/Accounting Applications for GNU/Linux, Note-taking Applications, and More

4.Does partition size effect appliction startup time?

Do larger partitions result in longer startup times for applications?

If so can noticeable improvements in startup time be achieved with 
smaller partitions?

Right now I have a 40 gig hard drive divided into 3 partitions of about 
10 gigs each.

Thanks in advance for the info

Steve

5.PATH takes no effect when login

I am trying to set the path in with adding lines in .bash_profile

if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi
if [ -f ~/test.env ]; then
   ~/test.env
fi
PATH=$PATH:$HOME/bin
export PATH

Where test.env contains just a few of lines,

export TOOLCHAIN_PATH=/1234567
export PATH=${TOOLCHAIN_PATH}/bin:$PATH
echo PATH=${PATH}

The last line in test.env is to make sure the desired path is added in
every login. Actually, I got what I want when login as following text
is shown
PATH=/1234567/bin:/user/kerberos/bin:/user/local/bin:/bin:/usr/bin

However, when the prompt comes up, I type "set" to further check,
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/shane/bin

Originally, the system work fine with the setting. I don't what
changes that sucks the system.

Can anyone give me some clues on this problem?

6. FPATH taking effect but functions not properly invoked

7. udev taking a long time during startup

8. [ patch 7/7] drivers/serial/jsm: new serial device driver



Return to linux

 

Who is online

Users browsing this forum: No registered users and 17 guest