From an earlier answer of mine
The German treatment of its Polish POWs was actually a rather complicated affair and prefigured many of the legal problems that naturally resulted from the Third Reich's war of conquest. In public, the Germans claimed that they were honoring both the 1929 Geneva Conventions and the Hague Regulations and were obeying the strictures of international law with regards to POWs. But the reality of the Polish POW situation was that the Germans were inadequately prepared for this situation and both the racialist precepts of the NSDAP leadership as well as the need for wartime labor further complicated events.
The Germans had approximately 400000 Polish POWs by the end of the Polish campaign, which was significantly more than what the OKW's apparatus for POWs care had prepared for, which was significantly less. The result was that by early 1940, the hygiene situation in the various POW camps in occupied Poland and the Reich had deteriorated significantly. Article 11 of the Geneva Convention held that POWs were to eat the same rations as garrison/depot troops, but the Germans flexibly interpreted Article 11 by asserting that they were receiving the same rations as the current German replacement army, who were responsible for their own rations. The Germans also began a process of separating out Polish POWs by race and ethnicity, which was in keeping with the Geneva convention as housing gentiles and Jews together during the Great War had caused problems. However, the racialist principles of Third Reich meant that Jewish POWs were segregated from their gentile compatriots. Counter-intuitively, Jewish POWs were among the first repatriated back to the General Government, albeit to the various ghettos and often bereft of their uniforms. Slovak-Poles were also repatriated to the protectorate of Bohemia-Moravia and ethnic Germans were allowed to return to the new Reichsgaue carved out of Poland. The rationale for this early repatriation of Jews was that Polish POWs were rapidly becoming a vital component of the Reich's labor force and the Germans did not want the racially undesirable inside the Reich.
By the end of 1939, approximately 300000 POWs were dragooned to serve as labor in the Reich with the bulk of them working as agricultural laborers in the fall of 1939. Initially, the Germans had planned only to have the ethnically desirable individuals working inside Germany and had implemented screening efforts of the POWs. But the shortages of labor were such that this precluded the attempt for such a screening endeavor. Only the ethnic Germans POWs still in captivity were allowed to opt out of this labor arrangement. By the summer of 1940, repatriation efforts had whittled down the number of Polish POWs to around 100000. By now, the position of the German government was that since Poland had ceased to exist as an actual entity, these individuals were no longer POWs and now disarmed former combatants. Although the international community generally did not approve of this measure, these remaining Polish POWs were private citizens in the eyes of the Reich and now able to "volunteer" for a work service in the Reich.
The German position that Poland was no longer a state posed a problem for capturing both emigre Poles and the various Home Army resistors as it was unclear as to what legal status these combatants fell under. Although the German position on the Home Army was relatively clear, the Polish troops under Allied arms was not. Gradually, the German position evolved to where the approximately 30000 captured Poles were treated as being soldiers operating under the flag of their uniform. The one exception to this was that the Germans considered Poles that had been ethnically German to be deserters.
Overall, the German treatment of Polish POWs was harsh and exploitative, but it never reached the murderous frenzy and institutional neglect that characterized German treatment of Soviet POWs. But the various semantic games and racialist impulses were a harbinger for the future treatment of racial undesirables captured in wartime. Although several officers floated the idea of raising a Polish army from these captured men, Hitler shot down this idea. The German policy to Polish POWs was at its core exploitative and while it was not genocidal at this point in the war, many of the basic preconditions for genocide were already in evidence by late 1939.
Source
Militärgeschichtliches Forschungsamt. Germany and the Second World War: Volume IX/II, German Wartime Society, Exploitation, Interpretations, Exclusions. Oxford: Clarendon Press, 2014.
I'd like to extend the question to polish generals as well, what happened to them and other polish commanders?