Fixed: [Error message from CLI if terminal is modified](https://github.com/clicon/clixon-controller/issues/122)
This commit is contained in:
parent
d5d23dd90e
commit
1904805103
2 changed files with 18 additions and 10 deletions
|
|
@ -62,6 +62,7 @@ Developers may need to change their code
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
* Fixed: [Error message from CLI if terminal is modified](https://github.com/clicon/clixon-controller/issues/122)
|
||||||
* Fixed: backend exit when receiving invalid NETCONF get select XPath
|
* Fixed: backend exit when receiving invalid NETCONF get select XPath
|
||||||
* Added XML encoding to XPaths in `select` attribute
|
* Added XML encoding to XPaths in `select` attribute
|
||||||
* Fixed: Fail on return errors when reading from datastore
|
* Fixed: Fail on return errors when reading from datastore
|
||||||
|
|
|
||||||
|
|
@ -302,10 +302,13 @@ clicon_rpc_connect_inet(clixon_handle h,
|
||||||
|
|
||||||
/*! Ensure all of data on socket comes through. fn is either read or write
|
/*! Ensure all of data on socket comes through. fn is either read or write
|
||||||
*
|
*
|
||||||
|
* Just called for read(2)
|
||||||
* @param[in] fn I/O function, ie read/write
|
* @param[in] fn I/O function, ie read/write
|
||||||
* @param[in] fd File descriptor, eg socket
|
* @param[in] fd File descriptor, eg socket
|
||||||
* @param[in] s0 Buffer to read to or write from
|
* @param[in] s0 Buffer to read to or write from
|
||||||
* @param[in] n Number of bytes to read/write, loop until done
|
* @retval n Bytes written (see man 2 read)
|
||||||
|
* @retval 0 EOF
|
||||||
|
* @retval -1 Error
|
||||||
*/
|
*/
|
||||||
static ssize_t
|
static ssize_t
|
||||||
atomicio(ssize_t (*fn) (int, void *, size_t),
|
atomicio(ssize_t (*fn) (int, void *, size_t),
|
||||||
|
|
@ -314,7 +317,8 @@ atomicio(ssize_t (*fn) (int, void *, size_t),
|
||||||
size_t n)
|
size_t n)
|
||||||
{
|
{
|
||||||
char *s = s0;
|
char *s = s0;
|
||||||
ssize_t res, pos = 0;
|
ssize_t res;
|
||||||
|
ssize_t pos = 0;
|
||||||
|
|
||||||
while (n > pos) {
|
while (n > pos) {
|
||||||
_atomicio_sig = 0;
|
_atomicio_sig = 0;
|
||||||
|
|
@ -562,9 +566,12 @@ clixon_msg_rcv11(int s,
|
||||||
if (intr){
|
if (intr){
|
||||||
if (clixon_signal_save(&oldsigset, oldsigaction) < 0)
|
if (clixon_signal_save(&oldsigset, oldsigaction) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
set_signal(SIGINT, SIG_IGN, NULL);
|
set_signal(SIGINT, SIG_IGN, NULL);
|
||||||
clicon_signal_unblock(SIGINT);
|
clicon_signal_unblock(SIGINT);
|
||||||
set_signal_flags(SIGINT, 0, atomicio_sig_handler, NULL);
|
set_signal_flags(SIGINT, 0, atomicio_sig_handler, NULL);
|
||||||
|
/* May be more signals to ignore */
|
||||||
|
set_signal(SIGWINCH, SIG_IGN, NULL);
|
||||||
}
|
}
|
||||||
while (*eof == 0 && eom == 0) {
|
while (*eof == 0 && eom == 0) {
|
||||||
/* Read input data from socket and append to cbbuf */
|
/* Read input data from socket and append to cbbuf */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue