Skip to content

Commit 15be3b0

Browse files
committed
Add accessor for included pty instance
Currently if I get passed a Process from by a method call I can check it for the Spawner and can already call special methods like hangup(). But there is no way to get access the the PTY used to create the Spawner so for example one can't call PTY#setTerminalSize or query any other properties. This now adds a new method pty() that returns this instance for further investigation and actions.
1 parent 04105c2 commit 15be3b0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

core/org.eclipse.cdt.core.native/about.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright (c) 2014, 2024 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2014, 2025 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
@@ -24,7 +24,7 @@ blurb=C/C++ Development Tooling Native Utilities\n\
2424
Version: {featureVersion}\n\
2525
Build id: {0}\n\
2626
\n\
27-
Copyright (c) 2014, 2024 Contributors to the Eclipse Foundation
27+
Copyright (c) 2014, 2025 Contributors to the Eclipse Foundation
2828
\n\
2929
See the NOTICE file(s) distributed with this work for additional\n\
3030
information regarding copyright ownership.\n\

core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/spawner/Spawner.java

+8
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,14 @@ public boolean isRunning() {
423423
return (raise(pid, SIG_NOOP) == 0);
424424
}
425425

426+
/**
427+
* @since 6.3
428+
* @return the current pty instance for this spawner
429+
*/
430+
public PTY pty() {
431+
return fPty;
432+
}
433+
426434
private void exec(String[] cmdarray, String[] envp, String dirpath) throws IOException {
427435
String command = cmdarray[0];
428436
SecurityManager s = System.getSecurityManager();

0 commit comments

Comments
 (0)