serial port programming question (newbie)

From: Donna Rigas
Date: Mon Jan 17 2011 - 19:28:08 EST


I see lots of serial port programming examples where the
port settings are saved before being changed to the desired settings,
then restored to the original before exiting the program via
tcgetattr and tgsetattr.

I see one example where someone comments that this is not necessary.

Can someone tell me whether or not it is necessary to save and restore the
old settings and if so, why?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/