eclipse-cdt-cloud / eclipse-cdt-cloud/cdt-gdb-adapter

mac: pty support not working

Open
#101 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
TypeScript
Stars
39
Forks
56
Avg merge
3d 9h
Merged PRs (30d)
2

Description

Related: https://github.com/eclipse-cdt/cdt-gdb-adapter/pull/97#issuecomment-500899450

Tried building on Mac, and there are some issues with the calls made to open a pseudo-terminal. The build process also outputs some warnings, and we get runtime errors when calling the native functions from node.

The issue has to do with the `tcgetattr` call that fails with `Inappropriate ioctl for device`, even though when using `isatty` it returns `1`.

When skipping the whole `termios cfmakeraw` it fails in the JS code that wraps the fd in a `net.Socket` object.

I tried properly wrapping it by creating read/write streams using the `fs` module: it removes the runtime errors, but the tests still fail.

I also tried replacing `ptsname_r` by `ttyname_r` as suggested by @thegecko, it removes the compilation warnings but we still get runtime errors.

It may require some more knowledge about ttys on OSX, as I am left just trying anything and everything only to eventually fail. I might pick this up again in the future, no guarantees.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.