Hi...
I have successfully open serial port and also able to read and write data on serial port with the following code:
int fd;
struct termios options;
fd=open("/dev/ttyS0",O_RDWR | O_NOCTTY | O_NDELAY)
;

But when i try to close serial port with close(fd) function,my application has been crashed and it gives segmentation fault.

So please tell me that how can i close serial port without my app crash..
Waiting for quick reply

Thanks..