Skip to content

process: resize stderr on SIGWINCH - #2231

Merged
Fishrock123 merged 1 commit into
nodejs:masterfrom
Fishrock123:stderr-resize
Jul 23, 2015
Merged

process: resize stderr on SIGWINCH#2231
Fishrock123 merged 1 commit into
nodejs:masterfrom
Fishrock123:stderr-resize

Conversation

@Fishrock123

Copy link
Copy Markdown
Contributor

Fixes: #2219

I'd consider this a patch level thing, but it could possibly be considered semver-minor; does anyone have opinions about that?

@Fishrock123Fishrock123 added the process Issues and PRs related to the process subsystem. label Jul 23, 2015
@cjihrig

Copy link
Copy Markdown
Contributor

LGTM. I'd say it's definitely a bug fix.

@bnoordhuis

Copy link
Copy Markdown
Member

LGTM and I agree with @cjihrig.

@thefourtheye

Copy link
Copy Markdown
Contributor

LGTMT

Comment threadsrc/node.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure but it looks like this will fail if _refreshSize needs to access this
Edit: that would explain why it was wrapped in a function.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this referring to the stream though? i.e. the stdout or stderr objects?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fishrock123 You might have to bind. stdout._refreshSize.bind(stdout)

EDIT: The actual definition https://github.com/nodejs/io.js/blob/master/lib/tty.js#L76-92 uses this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is supposed to, but in this case you are passing the method to the event emitter, without its context.
Result is the same as:

varobj={method(){console.log(this)}};obj.method();// objvarmethod=obj.method;method();// undefined

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh. Right. Javascript.

@Fishrock123
Fishrock123force-pushed the stderr-resize branch 2 times, most recently from e35c4a4 to 1b381e2CompareJuly 23, 2015 19:26
@Fishrock123

Copy link
Copy Markdown
ContributorAuthor

@targos fixed, PTAL

@targos

Copy link
Copy Markdown
Member

LGTM

Fixes: nodejs#2219
PR-URL: nodejs#2231
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
@Fishrock123
Fishrock123 merged commit bf2cd22 into nodejs:masterJul 23, 2015
@cjihrigcjihrig mentioned this pull request Jul 24, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processIssues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Fishrock123@cjihrig@bnoordhuis@thefourtheye@targos