Skip to content

Conversation

amosbird
Copy link
Contributor

No description provided.

@MaskRay
Copy link
Owner

MaskRay commented Apr 18, 2018

interactive signal blocking?

@amosbird
Copy link
Contributor Author

SIGTSTP only works for processes attached to a tty. I'm not sure what term should be used.

@MaskRay MaskRay merged commit b4cca89 into MaskRay:master Apr 18, 2018
@MaskRay
Copy link
Owner

MaskRay commented May 1, 2018

SIGSTOP requires multiple continue commands in gdb while SIGTSTP only requires 1

@amosbird
Copy link
Contributor Author

https://github.com/scottt/debugbreak looks better

@MaskRay
Copy link
Owner

MaskRay commented May 28, 2018

I have changed the code to:

  const char* traceme = getenv("CCLS_TRACEME");
  if (traceme)
    raise(traceme[0] == 's' ? SIGSTOP : SIGTSTP);

SIGTRAP (debugbreak) only works when the process has been attached by a debugger, not in our use case.

@MaskRay
Copy link
Owner

MaskRay commented May 28, 2018

LLVM also supports __builtin_debugtrap (llvm.debugtrap) for this purpose.

@amosbird
Copy link
Contributor Author

Oh, OK. Good to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants