profile
viewpoint
Guillaume J. Charmes creack Magic Leap Fort Lauderdale, FL https://blog.charmes.net @golang @docker @gofinance @while42-org

creack/docker-firefox 63

Firefox over Docker via VNC

creack/assumerole 4

Assume AWS role and auto refresh tokens.

creack/docker_devmapper 4

Docker statically linked with libdevmapper

creack/cpuminer 2

CPU miner for Litecoin and Bitcoin

creack/aef 1

Configuration variables management

creack/bug 1

Braille Unicode Graphics

creack/butterfly 1

Dockerfile for butterfly in-browser terminal

creack/dev 1

Docker image for golang/docker dev environment emacs/zsh/tmux

creack/docker-grpc 1

Dockerfile with protobuf, grpc and protoc-gen-go installed.

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 6858f9ae499672d2fc7c1c086486579aa59cee91

Bump go/linter versions Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 12 days

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 6c641fb8280ec2a94f2eca42f2b01597c087946e

dangling unstaged changes Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 12 days

issue commentcreack/pty

pty.start()

Closing in favor of the more generic #95

zhuchangfei

comment created time in 13 days

issue closedcreack/pty

pty.start()

why i cat use pty.start()?it point out that "undefined: pty.Start"

closed time in 13 days

zhuchangfei

issue closedcreack/pty

pty issue

In the file ioctl.go i'm getting "Multiple markers at this line - undefined: syscall.SYS_IOCTL - not enough arguments in call to syscall.Syscall" for the line "_, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr)" Could you please help me to resolve this issue.

closed time in 13 days

ShanthkumarS079

issue commentcreack/pty

pty issue

Going to close as too old. @ShanthkumarS079 if you are still having the issue, please feel free to re-open. In any case, if you remember, it would be awesome if you could add more details on which os/arch/go version you were using so I could try to reproduce.

ShanthkumarS079

comment created time in 13 days

issue closedcreack/pty

Test go1.13 on all supported platforms.

go1.13 introduce a change in the order ctty is set.

v1.1.5 has been confirmed to work on linux/amd64, but we'd need to re-test all platforms to make sure nobody will face an issue on next go release.

See golang/go#32527 and https://go-review.googlesource.com/c/go/+/178919 for more detail.

closed time in 13 days

creack

issue commentcreack/pty

Test go1.13 on all supported platforms.

Since we are not in 1.14 and almost 1.15, I'm going to assume all went well :)

creack

comment created time in 13 days

issue closedcreack/pty

Running FFmpeg Command

Hi. Please I need help using this package to run FFmpeg. I need to run a command as below as be able to capture the result:

ffmpeg -v quiet -i ../test_tracks/b.mp3 -f f32le -ac 1 -c:a pcm_f32le -ar 44100 pipe:1 | ./main - /dev/stdin

Thanks

closed time in 13 days

D-sense

delete branch creack/plantuml-hot-loader

delete branch : dependabot/npm_and_yarn/websocket-extensions-0.1.4

delete time in 13 days

push eventcreack/plantuml-hot-loader

dependabot[bot]

commit sha 1fe8b84c8b55eebaaa5bea2b0c848c642839340c

Bump websocket-extensions from 0.1.3 to 0.1.4 Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] <support@github.com>

view details

Guillaume J. Charmes

commit sha 3187706b9ba6138c05be6a7608d4350bb8ddb45b

Merge pull request #3 from creack/dependabot/npm_and_yarn/websocket-extensions-0.1.4 Bump websocket-extensions from 0.1.3 to 0.1.4

view details

push time in 13 days

PR merged creack/plantuml-hot-loader

Bump websocket-extensions from 0.1.3 to 0.1.4 dependencies

Bumps websocket-extensions from 0.1.3 to 0.1.4. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md">websocket-extensions's changelog</a>.</em></p> <blockquote> <h3>0.1.4 / 2020-06-02</h3> <ul> <li>Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by Robert McLaughlin)</li> <li>Change license from MIT to Apache 2.0</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/faye/websocket-extensions-node/commit/8efd0cd6e35faf9bb9cb08759be1e27082177d43"><code>8efd0cd</code></a> Bump version to 0.1.4</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/3dad4ad44a8c5f74d4f8f4efd3f9d6e0b5df3051"><code>3dad4ad</code></a> Remove ReDoS vulnerability in the Sec-WebSocket-Extensions header parser</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/4a76c75efb1c5d6a2f60550e9501757458d19533"><code>4a76c75</code></a> Add Node versions 13 and 14 on Travis</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/44a677a9c0631daed0b0f4a4b68c095b624183b8"><code>44a677a</code></a> Formatting change: {...} should have spaces inside the braces</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/f6c50aba0c20ff45b0f87cea33babec1217ec3f5"><code>f6c50ab</code></a> Let npm reformat package.json</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/2d211f3705d52d9efb4f01daf5a253adf828592e"><code>2d211f3</code></a> Change markdown formatting of docs.</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/0b620834cc1e1f2eace1d55ab17f71d90d88271d"><code>0b62083</code></a> Update Travis target versions.</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/729a4653073fa8dd020561113513bfa2e2119415"><code>729a465</code></a> Switch license to Apache 2.0.</li> <li>See full diff in <a href="https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 13 days

issue closedcreack/pty

read /dev/ptmx: input/output error

It's doesn't exist /dev/ptmx but /dev/pts/ptmx so I can make a soft link? or change the path hardcode in pty_linux.go?

closed time in 13 days

horsley

issue commentcreack/pty

read /dev/ptmx: input/output error

Seems there are actually multiple different issues here, some which have been fixed. I'm going to close as the ticket as been going on since 2014 and is mainly outdated noise at this point.

If anyone still has the issue, please open a new ticket and we'll make sure to get it fixed.

cc @rbUUbr I didn't spend too much time on this but couldn't reproduce the issue.

cc @fideloper sorry for the delayed answer, if you are still facing the issue, please open a new issue.

horsley

comment created time in 13 days

pull request commentcreack/pty

Add no NOCTTY, required for when there is no controlling terminal

What is left is testing. I started working on it, but it ended up quite much tricky than I expected to get a consistent result. The PR might fix this issue, but as the current version works for 99% of people, I want to make sure it also don't break for those.

viocle-kvanek

comment created time in 13 days

pull request commentcreack/pty

Add no NOCTTY, required for when there is no controlling terminal

@joshforbes I apologize, I didn't have much time to dig into it any further.

Could you provide more detail about your setup and use case? IIRC, you are trying to create a pty from a daemonized process on OSX, is that correct?

I'll try to get back to this asap to make sure we don't have issues moving forward on darwin.

viocle-kvanek

comment created time in 13 days

issue commentcreack/pty

Saving IO of shell, making a ttyrec

Could you provide more detail on what kind of issues you are having? If you want an example, I'd suggest to look at asciinema, which used to be in Go before moving to python: https://github.com/asciinema/asciinema/tree/v1.1.0

In the code sample, os.Stdin is the input stream, so indeed io.TeeReader can be used to pipe it into a file for recording keystroke by keystroke, for the output, we read from ptmx, so you can also use io.TeeReader there.

Something like this should be working fine:

recInput, _ := os.Create("/tmp/input")
recOutput, _ := os.Create("/tmp/output")

go func() { _, _ = io.Copy(ptmx, io.TeeReader(os.Stdin, recInput)) }()
_, _ = io.Copy(os.Stdout, io.TeeReader(ptmx, recOutput))
MartyEz

comment created time in 13 days

push eventcreack/geobed

Guillaume J. Charmes

commit sha 68c6877b212d62ad03879e04f0c78461913b6d82

Cleanup / simplify Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>

view details

push time in a month

fork creack/geobed

A simple, lightweight, embedded geocoder for Golang with city level accuracy

fork in a month

issue commentcreack/pty

inappropriate ioctl for device

@callnothing Can you provide a sample code to reproduce the issue by any chance? Also, could you describe what you are trying to accomplish? Why trying to set pgid? Depending on the use case, it might be better to go through pty.Open directly instead of pty.Start which is a generic helper with wraps pty.Open with some defaults.

Fransebas

comment created time in a month

release creack/pty

v1.1.11

released time in 2 months

created tagcreack/pty

tagv1.1.11

PTY interface for Go

created time in 2 months

push eventcreack/pty

Guillaume J. Charmes

commit sha 2a38352e8b4d7ab6c336eef107e42a55e72e7fbc

Add openbsd archs Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>

view details

push time in 2 months

PR merged creack/pty

Unify OpenBSD ztypes; adds arm support

OpenBSD supports go on aarch64, amd64, arm, arm64, armv7, and i386[0].

struct ptmget and PTMGET are defined as [1]

struct ptmget {
	int	cfd;
	int	sfd;
	char	cn[16];
	char	sn[16];
};
#define PTMGET _IOR('t', 1, struct ptmget) /* get ptys */

_IOR is defined as [2]

#define	IOC_OUT		(unsigned long)0x40000000
[...]
#define	_IOC(inout,group,num,len) \
	(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
[...]
#define	_IOR(g,n,t)	_IOC(IOC_OUT,	(g), (n), sizeof(t))

The only thing that can vary between architectures is the size of int and on all OpenBSD go arches int is 32 bits.

The GOARCH build constraint is to prevent possibly introducing a tricky to diagnose bug and prod someone to think about if the new arch has 32 bit ints.

0: https://github.com/openbsd/ports/blob/02149e13191e61fde4fa7de89ace05492ca15b6d/infrastructure/mk/arch-defines.mk#L27 1: https://github.com/openbsd/src/blob/3ddf179c951256438053c2d92edb80da28a6c1cd/sys/sys/tty.h#L67-L73 2: https://github.com/openbsd/src/blob/3ddf179c951256438053c2d92edb80da28a6c1cd/sys/sys/ioccom.h#L52-L63

+2 -15

4 comments

2 changed files

phy1729

pr closed time in 2 months

push eventcreack/pty

Matthew Martin

commit sha 110238dc2031e5bd8b1c27cd364f8bb6fc694a56

Unify OpenBSD ztypes; adds arm support (#98)

view details

push time in 2 months

pull request commentcreack/pty

Unify OpenBSD ztypes; adds arm support

LGTM, tested without issue.

phy1729

comment created time in 2 months

pull request commentcreack/pty

Unify OpenBSD ztypes; adds arm support

@phy1729 thank you for the PR and for the detailed links to openbsd to back up the change. I'll try to test it asap with a vm..

phy1729

comment created time in 2 months

pull request commentcreack/pty

Unify OpenBSD ztypes; adds arm support

cc @kr, should we reconsider the ztype file generation? IIRC freebsd had a similar case. I am wondering if it wouldn't be easier to just manage types manually instead of adding exceptions.

phy1729

comment created time in 2 months

release creack/pty

v1.1.10

released time in 2 months

created tagcreack/pty

tagv1.1.10

PTY interface for Go

created time in 2 months

delete branch creack/pty

delete branch : creack/start-with-attrs

delete time in 2 months

push eventcreack/pty

Guillaume J. Charmes

commit sha f272787f8567f27f7e09e88ed87a449c8742eac5

Add StartWithAttrs to allow bypassing setsid/setctty (#97) Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>

view details

push time in 2 months

PR merged creack/pty

Add StartWithAttrs to allow bypassing setsid/setctty

Revert #75 but don't change the "old" behavior of pty.Start and pty.StartWithSize.

Introduce pty.StartWithAttr to explicitly set process attributes, which allow for pty to be created without setsid/setctty, fixing the issue faced by aerc.

Fixes error with the new go1.15 behavior introduced in https://go-review.googlesource.com/c/go/+/231638/ ( golang/go#29458 ).

Fixes #96

cc @kr @ddevault @myitcv

+29 -12

8 comments

1 changed file

creack

pr closed time in 2 months

issue closedcreack/pty

Setctty set but Ctty not valid in child with Go +be08e10b3b

Steps to reproduce:

go version
go run .

-- go.mod --
module mod.com

go 1.15

require (
        github.com/creack/pty v1.1.9
        golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect
)
-- main.go --
package main

import (
        "io"
        "io/ioutil"
        "os/exec"

        "github.com/creack/pty"
)

func main() {
        cmd := exec.Command("vim")
        thepty, err := pty.Start(cmd)
        if err != nil {
                panic(err)
        }
        io.Copy(ioutil.Discard, thepty)
}

What did you expect to see?

No error

What did you see instead?

Error:

fork/exec /home/myitcv/dev/vim/src/vim: Setctty set but Ctty not valid in child

Bisected to this change: https://go-review.googlesource.com/c/go/+/231638/

FYI @ianlancetaylor @neild @mvdan

closed time in 2 months

myitcv

pull request commentcreack/pty

Add StartWithAttrs to allow bypassing setsid/setctty

I considered passing the tty as ExtraFiles, or even setting Ctty to stdout when stdin is overridden, but as the change is relatively recent and splitting a tty in part if usually a bad idea, I think it is better to revert the main helper to the original behavior.

Edge cases needing to do that can use the new helper or directly call pty.Open.

creack

comment created time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha bdd86ddf7184c3f8e0af2b9fec9048808a7f2a95

Update gitignore Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 11bfadff76321233da79892b918ce341f11e3dc1

Add zsh plugins Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 9e4657272e7fe40fd908acb7f0ae630b27f79763

Progress toward org mode conf Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

pull request commentcreack/pty

Add StartWithAttrs to allow bypassing setsid/setctty

Will merge and publish new tag tomorrow.

creack

comment created time in 2 months

pull request commentcreack/pty

Add StartWithAttrs to allow bypassing setsid/setctty

@ddevault I submitted a patch here https://lists.sr.ht/~sircmpwn/aerc/patches/10481 it fixes the pty-example case. Please let me know if you find more issues.

creack

comment created time in 2 months

PR opened creack/pty

Add StartWithAttrs to allow bypassing setsid/setctty

Revert #75 but don't change the "old" behavior of pty.Start and pty.StartWithSize.

Introduce pty.StartWithAttr to explicitly set process attributes, which allow for pty to be created without setsid/setctty, fixing the issue faced by aerc.

Fixes error with the new go1.15 behavior introduced in https://go-review.googlesource.com/c/go/+/231638/ ( golang/go#29458 ).

Fixes #96

cc @kr @ddevault @myitcv

+29 -12

0 comment

1 changed file

pr created time in 2 months

create barnchcreack/pty

branch : creack/start-with-attrs

created branch time in 2 months

pull request commentcreack/pty

Set Ctty in SysProcAttr

Thank you for the sample. I did reproduce.

After digging into the aerc code, I think I understand the problem. aerc uses lib-vterm and runs a pty process inside of it while expected vterm to be the controlling terminal.

As vterm is already the "head" of the session, the process could simply inherit it instead of creating a new one. I managed to run the example properly by setting Setsid and Setctty to false.

I'll do some more digging, but at first glance, it looks like the 1.15 is the expected behavior.

ddevault

comment created time in 2 months

pull request commentcreack/pty

Set Ctty in SysProcAttr

I just started diffing into this after a while, I am a bit rusty, but the Golang patch seem to make sense. As pty.Start creates a detached process in a new session, the controlling terminal is not the parent's try, but the local one, i.e. 0.

I'll look into aerc, but if you'd have a reproducible snippet showcasing the issue, it would help a lot.

ddevault

comment created time in 2 months

pull request commentcreack/pty

Set Ctty in SysProcAttr

I think I will have to revert this because of #96. Go1.15 now errors out when setting the controlling terminal to a parent.

@ddevault Could you provide more detail on the initial issue? After reverting, I haven't been able to reproduce an issue with less or stdin dependent processes.

ddevault

comment created time in 2 months

issue commentcreack/pty

Setctty set but Ctty not valid in child with Go +be08e10b3b

reproduced. Investigating.

myitcv

comment created time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 45c217defbd142541fb920519e6be65f9ade9c32

bootstrap orgmode emacs conf Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha ffa1328778077fd3a4c26edd84be91eac9358303

Stage conf before moving to org Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

issue commentcreack/pty

Support Windows through `conpty`

Having windows support would be great.

PRs are welcome indeed :)

On Thu, Apr 30, 2020 at 1:29 AM Edgar Lee notifications@github.com wrote:

Windows 10 gained support for psuedo-terminals with conpty: https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/

Prior art:

Would you be open to a PR?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/creack/pty/issues/95, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7LZNURJEB7ZAQFBT77DLRPEEDXANCNFSM4MVF3YSA .

--

Guillaume J. Charmes Software Engineer https://blog.charmes.net [image: Guillaume J. Charmes on about.me] https://blog.charmes.net

hinshun

comment created time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 90905c7d652212fa7e59f3dd8ec4e44d0315dd2d

Setup emacs as graphical mode Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

Guillaume J. Charmes

commit sha 0aa7111dca1832b318022b2a0fab12e6e36ea58f

Wrap up graphical emacs config.

view details

push time in 2 months

push eventcreack/dotfiles

Guillaume J. Charmes

commit sha 46f15d983109fbd0f964b33c0db12bbe2089124f

minor update Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

Guillaume J. Charmes

commit sha f6f715a87b2f03f096843673b4369a1807645493

add xresource Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 2 months

push eventcreack/refresh

Guillaume J. Charmes

commit sha c1ac13a787468158e6b70cae63a54ad1ddd56a15

Minor tweak to websocket layout Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 3 months

push eventcreack/refresh

Guillaume J. Charmes

commit sha 92af50080ce1f32cd551c72dc0b2d5c5d0e34074

Add websocket support Signed-off-by: Guillaume J. Charmes <gcharmes@magicleap.com>

view details

push time in 3 months

push eventcreack/bug

Guillaume J. Charmes

commit sha 2f84cb0ba929bf690290bf2e065e561dcfe75d00

FIx typo in readme.

view details

push time in 3 months

push eventcreack/bug

Guillaume J. Charmes

commit sha 7b893e6495eb8df18408060b248c52d4e42cdf6b

Fix typo

view details

push time in 3 months

more