aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/terminals.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-20 15:49:28 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-20 15:49:28 +0100
commitbe42aa717c3018ccf1c7ce4267e02cfe9210cc1e (patch)
tree23ea534f073473db63cb1df7a4649d2a1a8035af /gcc/ada/terminals.c
parent4cea8675697151f7e8c5b30259da9ac0971ab070 (diff)
downloadgcc-be42aa717c3018ccf1c7ce4267e02cfe9210cc1e.zip
gcc-be42aa717c3018ccf1c7ce4267e02cfe9210cc1e.tar.gz
gcc-be42aa717c3018ccf1c7ce4267e02cfe9210cc1e.tar.bz2
[multiple changes]
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb: minor style fixes in comments. * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay relative statement introduces an implicit dependency on Ada.Real_Time.Clock_Time. * sem_util.adb: Minor reformatting. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment must be treated as delayed aspect even if the expression is a literal, because the aspect affects the freezing and the elaboration of the object to which it applies. 2017-01-20 Tristan Gingold <gingold@adacore.com> * s-osinte-vxworks.ads (Interrup_Range): New subtype. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Generate_Reference): Do not warn about the presence of a pragma Unreferenced if the entity appears as the actual in a procedure call that does not come from source. 2017-01-20 Pascal Obry <obry@adacore.com> * expect.c, terminals.c: Fix some warnings about unused variables. * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part of the runtime. 2017-01-20 Bob Duff <duff@adacore.com> * exp_attr.adb (Constrained): Apply an access check (check that the prefix is not null) when the prefix denotes an object of an access type; that is, when there is an implicit dereference. 2017-01-20 Gary Dismukes <dismukes@adacore.com> * s-rident.ads (constant Profile_Info): Remove No_Calendar from GNAT_Extended_Ravenscar restrictions. 2017-01-20 Tristan Gingold <gingold@adacore.com> * s-maccod.ads: Add pragma No_Elaboration_Code_All From-SVN: r244718
Diffstat (limited to 'gcc/ada/terminals.c')
-rw-r--r--gcc/ada/terminals.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index 675ac35..35185c7 100644
--- a/gcc/ada/terminals.c
+++ b/gcc/ada/terminals.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2008-2015, AdaCore *
+ * Copyright (C) 2008-2016, AdaCore *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -1410,7 +1410,8 @@ __gnat_setup_child_communication
#ifdef TIOCSCTTY
/* make the tty the controlling terminal */
- status = ioctl (desc->slave_fd, TIOCSCTTY, 0);
+ if ((status = ioctl (desc->slave_fd, TIOCSCTTY, 0)) == -1)
+ return -1;
#endif
/* adjust tty settings */
@@ -1424,8 +1425,10 @@ __gnat_setup_child_communication
if (desc->slave_fd > 2) close (desc->slave_fd);
/* adjust process group settings */
- status = setpgid (pid, pid);
- status = tcsetpgrp (0, pid);
+ if ((status = setpgid (pid, pid)) == -1)
+ return -1;
+ if ((status = tcsetpgrp (0, pid)) == -1)
+ return -1;
/* launch the program */
execvp (new_argv[0], new_argv);
@@ -1562,9 +1565,9 @@ pty_desc *
__gnat_new_tty (void)
{
int status;
- pty_desc* desc;
- status = allocate_pty_desc (&desc);
- child_setup_tty (desc->master_fd);
+ pty_desc* desc = NULL;
+ if ((status = allocate_pty_desc (&desc)))
+ child_setup_tty (desc->master_fd);
return desc;
}