Thanks to visit codestin.com
Credit goes to github.com

Skip to content

calling os.Exit(0) from a gopherjs run invocation fails with "fatal error: all goroutines are asleep - deadlock!" #531

Closed
@nullstyle

Description

@nullstyle

Here's the repro script:

package main

import (
    "fmt"
    "os"
)

func main() {
    fmt.Println("hello world")
    os.Exit(0)
}

sample results:

➜  testj git:(mithril) ✗ gopherjs run ./main.go
gopherjs: Source maps disabled. Use Node.js 4.x with source-map-support module for nice stack traces.
hello world
fatal error: all goroutines are asleep - deadlock!

This appears to be the root cause of #395 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions