GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Spawn detached window hide option by sam-github · Pull Request #2908 · nodejs/node

Conversation

@sam-github

@sam-github sam-github commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

Detached children are run in a new console window by default. For
children that are intended to run in the background with no console I/O,
this window is an annoying pop-up, so uv allows it to be hidden.

I can't think of a way to test this other than manually, which I still have to do, but @piscisaureus, this is what you suggested (I think).

/cc @nodejs/platform-windows

Includes a bit of the docs from #2903.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sam-github sam-github added child_process Issues and PRs related to the child_process subsystem. windows Issues and PRs related to the Windows platform. semver-minor PRs that contain new features and should be released in the next minor version. labels Sep 16, 2015
cjihrig
cjihrig reviewed Sep 16, 2015
View reviewed changes
Comment thread src/env.h Outdated

@cjihrig cjihrig Sep 16, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Should this just be hide_string?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sam-github sam-github Sep 16, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I was modelling it after the UV constant name, but I see that hide_string would be better, done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cjihrig cjihrig mentioned this pull request Sep 16, 2015
net, child_process, and buffer doc patches #2903
Closed
@bnoordhuis

bnoordhuis commented Sep 16, 2015

Copy link
Copy Markdown
Member

LGTM. hide only makes sense when combined with detached? Maybe you can reject invalid combinations?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Sep 16, 2015

Copy link
Copy Markdown
Contributor Author

I could assert that if .hide is true, so is .detached, that's the only "invalid" combination (its not really invalid, in that uv ignores it, I think).

If there is no detached window, its a harmless nul-op. I'm not sure if asserting would make the API more predictable and avoid people wondering why hide didn't do anything (not sure what they would be thinking it would do, though, if detached was not set), or more annoying, I'm a bit on the fence.

But you think it would help people if they were hoping that .hide had some meaning independent of .detached by failing fast?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@piscisaureus

piscisaureus commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

hide only makes sense when combined with detached? Maybe you can reject invalid combinations?

Yeah, I don't really see the point of that. windows_verbatim_arguments doesn't throw on *nix either, does it?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Sep 16, 2015

Copy link
Copy Markdown
Member

Virtual shrug, no strong opinion. Any future bug reports, I'll assign them to you guys.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@piscisaureus

piscisaureus commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

I'm +1 on this, but since I suggested it in the first place I'd like to get another LGTM from @orangemocha or @joaocgreis or @mscdex .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rvagg

rvagg commented Sep 16, 2015

Copy link
Copy Markdown
Member

sort of related #556

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mscdex
mscdex reviewed Sep 16, 2015
View reviewed changes
Comment thread doc/api/child_process.markdown Outdated

@mscdex mscdex Sep 16, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

s/it's/its/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mscdex

mscdex commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

One minor nit, but otherwise LGTM.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github
sam-github force-pushed the spawn-detached-window-hide-option branch from ea16d4a to dc4e069 Compare September 16, 2015 20:02
@orangemocha

orangemocha commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

Generally LGTM.

Regarding the semantics of hide when not detached, I have two suggestions, alternative to each other:

  1. Has no effect if not detached => Is ignored if not detached, and actually don't pass it to libuv. It prevents any foreseeable side-effects so that there are no bugs down the road.
  2. Instead of detached + hide, support a background option that does the combination of those two (hide is not necessary at that point).
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Sep 17, 2015

Copy link
Copy Markdown
Contributor Author

2 seems somewhat easier to use, and more expressive of the intent, but slightly disconnected from uv.

Also, neither detached or background really do anything like what the option name would suggest on non-Windows. I kindof like that about hide, its clearly a windows specific variant of attached (edit: detached is what I meant to write), and easy to describe as a no-op on Linux.

I can write code that sets detached and hide, and it will work on v0.10, there will just be an ugly window, and will work better once this PR merges. For background, I would have to set detached and background, so its all about the same to me (as long as the combination is supported - if I have to start do node version checking to see what options to pass I'll be annoyed!).

I think I just talked myself into prefering @orangemocha's option 1. :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orangemocha

orangemocha commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

For background, I would have to set detached and background, so its all about the same to me

Just to clarify, background wouldn't require detached. Just passing background would give you the same semantics as the current detached + hide.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Sep 17, 2015

Copy link
Copy Markdown
Contributor Author

@orangemocha I understand, but I would always pass both, because then it would work on v0.10 and v4.wherever-this-is-released.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orangemocha

orangemocha commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

@sam-github : got it now. It makes sense -considered the need for backward compatbility- that an additive property like hide is preferable. LGTM and feel free to take or leave the suggestion at 1) (not passing UV_PROCESS_WINDOWS_HIDE to uv when not needed).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott
Trott force-pushed the master branch from 1e896a6 to 082cc8d Compare December 27, 2015 02:00
mscdex and others added 10 commits February 15, 2016 11:30
@mscdex Myles Borins
dgram: prevent disabled optimization of bind()
6e829b4
Reassigning a named parameter while also using the arguments
object causes the entire function to never be optimized.

PR-URL: nodejs#4613
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott Myles Borins
test: move resource intensive tests to sequential
8ea7660
To enable greater parallelization of tests on CI, move resource
intensive tests out of parallel and into sequential.

Ref: nodejs#4476
PR-URL: nodejs#4615
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott Myles Borins
test: remove 1 second delay from test
909b516
In test-cluster-worker-wait-server-close, remove unneeded 1-second delay
and refactor to eliminate flakiness on FreeBSD.

PR-URL: nodejs#4616
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@zoubin Myles Borins
stream: remove useless if test in transform
d71f999
PR-URL: nodejs#4617
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@indutny Myles Borins
tls_legacy: do not read on OpenSSL's stack
7821b3e
Do not attempt to read data from the socket whilst on OpenSSL's stack,
weird things may happen, and this is most likely going to result in some
kind of error.

PR-URL: nodejs#4624
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott Myles Borins
debugger: remove variable redeclarations
583f334
Some variables are declared with var more than once in the same scope.
This change reduces the declarations to one per scope.

PR-URL: nodejs#4633
Reviewed-By: jasnell - James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@Trott Myles Borins
test: fix race in test-net-server-pause-on-connect
baa0a3d
A 50ms timeout results in a race condition. Instead, enforce expected
order through callbacks. This has the side effect of speeding up the
test in most situations.

Ref: nodejs#4476
PR-URL: nodejs#4637
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@zoubin Myles Borins
doc: add docs for more stream options
9ca24de
PR-URL: nodejs#4639
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Chris Dickinson <[email protected]>
@evanlucas Myles Borins
net: remove hot path comment from connect
40c8e6d
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: nodejs#4648
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@cjihrig Myles Borins
test: fix flaky test-net-socket-local-address
d615757
Prior to this commit, the test was flaky because it was
executing the majority of its logic in a function called from
the client and multiple events on the server. This commit
simplifies the test by separating the server's connection and
listening events, and isolating the client logic.

Refs: nodejs#4476
Refs: nodejs#4644
PR-URL: nodejs#4650
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@CharliesAngel1 CharliesAngel1 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities CharliesAngel1/node#11
Open
@RickAllMighty8195 RickAllMighty8195 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities RickAllMighty8195/node#29
Open
@Megoy-Tambayan Megoy-Tambayan mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities Megoy-Tambayan/node#2
Open
@Dixiejane Dixiejane mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities Dixiejane/node#17
Open
@JCsomeShots JCsomeShots mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities JCsomeShots/node#13
Open
@jj-crypto jj-crypto mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities jj-crypto/node#26
Open
@ZRDK ZRDK mentioned this pull request Feb 11, 2024
[Snyk] Security upgrade node-gyp from 9.4.1 to 10.0.0 ZRDK/node#67
Open
@buzzlightyear726 buzzlightyear726 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities buzzlightyear726/node#44
Open
@Renukaloch Renukaloch mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities Renukaloch/node#26
Open
@MaxMood96 MaxMood96 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities MaxMood96/node#44
Open
@davidmather davidmather mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities davidmather/node#18
Open
@mrod0101 mrod0101 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities mrod0101/node#14
Closed
@CxsLucyfer CxsLucyfer mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities CxsLucyfer/node#7
Open
@dewaynesmith3711 dewaynesmith3711 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities dewaynesmith3711/node#77
Open
@kingjay66 kingjay66 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities kingjay66/node#9
Open
@zhangpan0907 zhangpan0907 mentioned this pull request Feb 11, 2024
[Snyk] Fix for 1 vulnerabilities zhangpan0907/node#5
Open
@Supermajestcd Supermajestcd mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities Supermajestcd/node#23
Open
@SanchitMahajan236 SanchitMahajan236 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities SanchitMahajan236/node#28
Open
@terrorizer1980 terrorizer1980 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities Exhorder6/node#29
Open
@myvali998 myvali998 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities myvali998/node#14
Open
@ambai ambai mentioned this pull request Feb 12, 2024
[Snyk] Security upgrade node-gyp from 9.4.1 to 10.0.0 ambai/node#73
Open
@dewaynesmith3711 dewaynesmith3711 mentioned this pull request Feb 12, 2024
[Snyk] Security upgrade node-gyp from 8.4.1 to 10.0.0 dewaynesmith3711/node#79
Open
@BryanLaura BryanLaura mentioned this pull request Feb 12, 2024
[Snyk] Security upgrade node-gyp from 8.4.1 to 10.0.0 BryanLaura/node#89
Open
@nicholaschoi168 nicholaschoi168 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities nicholaschoi168/node#19
Open
@jefeaguila jefeaguila mentioned this pull request Feb 12, 2024
[Snyk] Security upgrade node-gyp from 9.4.1 to 10.0.0 jefeaguila/node#54
Open
@Michaela813 Michaela813 mentioned this pull request Feb 12, 2024
[Snyk] Security upgrade node-gyp from 9.4.1 to 10.0.0 Michaela813/node#57
Open
@chrismilleruk chrismilleruk mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities chrismilleruk/node#16
Open
@Michaela813 Michaela813 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities Michaela813/node#58
Open
@JoanKalanzi1 JoanKalanzi1 mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities JoanKalanzi1/node#18
Open
@BryanLaura BryanLaura mentioned this pull request Feb 12, 2024
[Snyk] Fix for 1 vulnerabilities BryanLaura/node#90
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

child_process Issues and PRs related to the child_process subsystem. semver-minor PRs that contain new features and should be released in the next minor version. windows Issues and PRs related to the Windows platform.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

20 participants

@sam-github @bnoordhuis @piscisaureus @rvagg @mscdex @orangemocha @MylesBorins @cjihrig @jasnell @Trott @zoubin @indutny @evanlucas @kohei-takata @pgeiss @estliberitas @JacksonTian @silverwind @zkat @santigimeno
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.